4

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 ?

2 Answers 2

5

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.

Sign up to request clarification or add additional context in comments.

1 Comment

thanks, I know pip3 works just fine. Maybe I wasn't precise, I need to install from brew. It's about specific version and other dependencies.
0

The problem with the Homebrew is that it sees only the system's python and the one it installed itself. So you have to first install python3 via brew and then use the --with-python3 option.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.