0

I tried installing numpy with homebrew, but instead it installed in the Python 2.7 version. I found this out by following the answer on this post: Can't import numpy

Which is very strange especially since I specifically asked for python3:

M$ brew install numpy --with-python3
Warning: homebrew/python/numpy-1.11.1 already installed

However, when I try importing it in Python 3.5 I always get the same error:

  File "Dataframe.py", line 1, in <module>
    import numpy as np
ImportError: No module named 'numpy'

How can I get it to work as intended? I am on mac os 10.11.3

Community
  • 1
  • 1
David Andrei Ned
  • 799
  • 1
  • 11
  • 28

1 Answers1

1

Check that you have Python 3.5 installed by running which python3 and which python (to make sure your versions aren't mixed up).

Then, to install for Python 3, you should run pip3 install numpy. It's a good idea to use the given Python tools to install Python-related packages.

freddiev4
  • 2,501
  • 2
  • 26
  • 46