As I know this seems to be a common question, I have looked at the other threads and can't seem to figure out how to apply to my own situation. The threads I have looked at so far are: NumPy in IDLE (Python 3.3.2) on Mac OSx 10.8 Install Numpy on Mac OS X Lion 10.7
I have installed the version 3.4 of Python from the main Python.org website, and have been accessing it via the IDLE application. I recently decided to try and add the SciPy packages via Macports and have run into difficulty.
I successfully downloaded and installed the SciPy packages, but when I try and import numpy (or matplotlib etc.) i get the following message:
>>> import numpy
Traceback (most recent call last):
File "<pyshell#17>", line 1, in <module>
import numpy
ImportError: No module named 'numpy'
I have verified that numpy (and the other SciPy components) is installed, and is at the following location:
/opt/local/var/macports/sources/rsync.macports.org/release/tarballs/port
Also if I try to use pip install numpy
, I get the following:
Requirement already satisfied (use --upgrade to upgrade): numpy in /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python
Cleaning up...
I presume the problem is that IDLE is not linking to the new components, but I'm not sure how to resolved this. I have tried to run the following in the terminal window:
export PYTHONPATH=/Library/Python/2.7/site-packages:$PYTHONPATH
But this hasn't made any difference that I can see, and I am a little lost as to where to go from here.
If it's relevant when i run which python
from the terminal window, i get the following result:
/usr/bin/python
I am running a Macbook Pro 2011, with OSX 10.9 (Mavericks). I am also very new to programming and terminal interfaces, so please try and give a simple answer if possible.