How to install pip on python 3.6, not the default python 2.7?
You shouldn't delete the system python. Delete nothing in /Library/Python
or it's subfolders.
How did you install python 3.6? Usually, it'll be installed as python3.6
with a symlink to python3
. pip3
is usually installed with it.
So what you probably wanted to do was:
pip3 install numpy
python3
>>> import numpy
Fizics
Updated on May 24, 2020Comments
-
Fizics almost 4 years
So all day, I have been trying to install pip. I've executed
curl https://bootstrap.pypa.io/get-pip.py > get-pip.py
. Thensudo python get-pip.py
. Next I went to install numpy withsudo pip install numpy
. Finally, I opened up the python 3.6 IDLE and I tried toimport numpy as np
and got an error saying that the module didn't exist.I found out that the pip was installed in
/Library/Python/2.7/site-packages
so I deleted 2.7 from the directory. I redid the whole process again and got the same error :|I'm wondering if I need to change the default
python
which I've been told is not wise. What do I do? I' sure I've deleted everything with python 2.7 in it?MacBookAir OSX - Sierra
Or is there an alternate way that I can install numpy in python 3.6????
-
MaddTheSane over 7 years
python3 -m pip
will also reliably use the python installation you want. -
Fizics over 7 yearsI downloaded python 3.6 straight from the python.org website. I will keep your first comment in mind and I'll try your suggestions. Thanks