speedingeer February 2016

OSX installing numpy via brew for python3

I can't install numpy for python3 via brew.

I type:

brew install numpy --with-python3

then it's OK for python2

Python 2.7.6 (default, Sep  9 2014, 15:04:36) 
[GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.39)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import numpy
>>>

but still not found for python3

Python 3.4.0 (v3.4.0:04f714765c13, Mar 15 2014, 23:02:41) 
[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import numpy
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named 'numpy'
>>>

How to make it work for python3 ?

Answers


sorin February 2016

The correct way to install it is via:

pip3 install numpy

Obviously, you need to install python3 and pip first. I tested and works without any problem.

Post Status

Asked in February 2016
Viewed 2,231 times
Voted 14
Answered 1 times

Search




Leave an answer