Andrew Andrew - 2 years ago 135
Python Question

Locate MacPorts package?

I just installed the py27-numpy package via MacPorts and python will not find the module when I use this command:

import scipy

I used the
command and the scipy port did not come up.

Clearly the path is not configured correctly or MacPorts is not installing in the correct place, but either way, it would solve my problem to know where this package is being installed.

Where can I find the path to MacPorts-installed package, py27-scipy?

Output of
echo $PATH


I cannot find the package in any of those locations.

Thanks for the help.

Answer Source

Your PATH is incorrect. It appears to be picking up another Python 2.7, likely one installed using a binary installer from or elsewhere, and not the MacPorts installed one. Try removing the the /Library/Frameworks/Python.framework/Versions/2.7/bin from PATH or just invoke the MacPorts Python directly:

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download