Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am running macports to install scipy and such on OS X leopard with python 2.7. The install runs successfully, but running python and trying to import the packages I've installed, they're not found.

What I'm running is:

sudo python_select python27 
sudo port install py27-wxpython py27-numpy py27-matplotlib 
sudo port install py27-scipy py27-ipython

Opening up python in interactive mode (it is the correct version of python), I type 'import scipy' and get a module not found error. What gives? How can I find out where it is installing the packages to instead?

share|improve this question
How do you start python - what bersion does it print at the start and what is the value of sys.path? – Mark Dec 15 '10 at 22:22

MacPorts installs Python 2.7 packages at /opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages. Check to make sure that this path is in sys.path in Python. SciPy would be installed in scipy under that directory. Also check port contents py27-scipy to ensure that the files are in the right place.

share|improve this answer
If that path is not in sys.path, how can I add it? – xmaslist Dec 11 '10 at 17:48
If you're running MacPorts Python located at /opt/local/bin/python then it should already be added for you. Are you sure you are running the right Python? Is /opt/local/bin in your PATH? – fideli Dec 11 '10 at 19:08
port contents py27-scipy

compare this with the ouput of:

import sys
from pprint import pprint
share|improve this answer
Thanks! Always wanted to know such command as port contents. – Valeriy Van Aug 1 '14 at 13:43

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.