3

So all day, I have been trying to install pip. I've executed curl https://bootstrap.pypa.io/get-pip.py > get-pip.py. Then sudo python get-pip.py. Next I went to install numpy with sudo pip install numpy. Finally, I opened up the python 3.6 IDLE and I tried to import 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????

Fizics
  • 105
  • 2
  • 2
  • 7
  • Is your 3.6 still in beta? There have posts about `numpy` not working with the beta Python. It'll be safer to stick with 3.5 until that's fully released. – hpaulj Dec 25 '16 at 00:06
  • http://stackoverflow.com/questions/40893602/how-to-install-numpy-for-python-3-6 – hpaulj Dec 25 '16 at 00:11
  • But just now, http://stackoverflow.com/questions/41316631/python-3-6-trying-to-pip-install-numpy – hpaulj Dec 25 '16 at 00:16
  • It was the newest version available, released a few days ago so I would guess that it is still in beta. Thanks for the response. – Fizics Dec 25 '16 at 00:48

1 Answers1

12

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
Josh Smeaton
  • 47,939
  • 24
  • 129
  • 164
  • 5
    `python3 -m pip` will also reliably use the python installation you want. – Josh Lee Dec 24 '16 at 22:28
  • I 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 – Fizics Dec 25 '16 at 00:46