Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

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

How does one get python modules working on a local machine?

I followed the doc here: https://docs.python.org/2/install/ to no avail.

I tried putting a known working module in the following locations ( /usr/local/lib/pythonX.Y/site-packages and /usr/local/lib/python2.7/site-packages/ ) and an import in python does not work.

Is there a cache I have to rebuild or something?

My Python path:

['', '/usr/lib/python2.7', '/usr/lib/python2.7/plat-x86_64-linux-gnu', '/usr/lib/python2.7/lib-tk', '/usr/lib/python2.7/lib-old', '/usr/lib/python2.7/lib-dynload', '/usr/local/lib/python2.7/dist-packages', '/usr/lib/python2.7/dist-packages', '/usr/lib/python2.7/dist-packages/PILcompat', '/usr/lib/python2.7/dist-packages/gtk-2.0', '/usr/lib/pymodules/python2.7', '/usr/lib/python2.7/dist-packages/ubuntu-sso-client', '/usr/lib/python2.7/dist-packages/wx-2.8-gtk2-unicode']

share|improve this question
Did you change your $PYTHONPATH to reflect the path of the new module? – i08in Apr 20 '14 at 6:45
What is your Python module search path? python -c 'import sys; print sys.path' – Gilles Apr 20 '14 at 19:01

Your Answer


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

Browse other questions tagged or ask your own question.