user413734 user413734 - 1 year ago 111
Python Question

Site packages in Python

So I have two sitepackage folders:

  1. Under: /Library/Python/2.6/site-packages

  2. Under: /Library/Python/2.6/site-packages /Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages

Every time I do sudo easy_install module, Python installs it in (1).
Every time I try to import it from (1), Python can't find it.

Every time I move that module with copy and paste to (2), Python can find it.

Is there an elegant/regular way to make Python install it in the correct sitepackages?

Answer Source

Add /Library/Python/2.6/site-packages to your PYTHONPATH.

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