I am trying to run a small program from the command line under Linux. The program runs correctly when I use IDLE but I cant run it from the command line. I ran this little program to tell me my path:
import sys
print sys.path
Under IDLE I have the following entry:
/usr/local/lib/python2.7/dist-packages
/usr/lib/python2.7/dist-packages
These entries are not there when I run under the command line. The package that I need to import (selenium) is in dist-packages. I get the following error when trying to import selenium.
from selenium import webdriver
...
ImportError: No module named selenium
I have tried pip install selenium, pip uninstall selenium, doesnt fix the problem. When I try python setup.py install (on the selenium install file) I get:
error: invalid command 'easy_install'
How can I solve this problem - do I have to add: /usr/local/lib/python2.7/dist-packages to my path, and if so how do I do that?