Azimout's Linux weblog

Python modules installed through MacPorts

leave a comment »

MacOSX already includes the Python interpreter. However, if you install Python modules using MacPorts, you won’t be able to import them in your Python programs (ImportError: No module named <module name>).

The reason is that Apple’s Python doesn’t “see” the modules installed through MacPorts; you need to use MacPorts’s Python.

To see a list of available Python interpreters, run port select python. Then to choose e.g. MacPorts’s Python 2.6, run sudo port select python python26


Written by azimout

07/10/2011 at 09:44

Posted in Howto

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: