[Tutor] Installing python and numpy on the Mac (OSX)

Albert-Jan Roskam sjeik_appie at hotmail.com
Sat Dec 23 04:57:15 EST 2017


Op 23 dec. 2017 09:47 schreef Peter Hodges <designx1000 at gmail.com>:
>
> Hi. I downloaded Python 3.6 from the python site, then followed online directions for pip to install numpy (in users? —user was in the example).
> When I start IDLE in the Python 3.6 in Applications and then type import numpy as np I get the following:
> import numpy as np
> Traceback (most recent call last):
>   File "<pyshell#0>", line 1, in <module>
>     import numpy as np
> ModuleNotFoundError: No module named ‘numpy'
>
> Does this mean I need to set the $PATH with some new pathname?
> Or move the numpy directory into the python 3.6 directory?
> Or?

Hi,

Perhaps you installed numpy for Python 2? What do you get when you type "python --version"? You could use virtualenv and use python 3 there (with -p), then pip install numpy in that virtualenv.

Or, do (without sufficient rights):
python3.6 $(which pip) install numpy

Untested (I don't own a Mac)


More information about the Tutor mailing list