After installing mechanize, I don't seem to be able to import it.
I have tried installing from pip, easy_install, and via python setup.py install
from this repo: https://github.com/abielr/mechanize. All of this to no avail, as each time I enter my Python interactive I get:
Python 2.7.3 (default, Aug 1 2012, 05:14:39)
[GCC 4.6.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import mechanize
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named mechanize
>>>
The installations I ran previously reported that they had completed successfully, so I expect the import to work. What could be causing this error?
sys.path
to see if you're looking in the right places,ls -laR /usr/local/lib/python2.7/dist-packages/mech*
to check for permissions trouble, and look atimp.find_module("mechanize")
to distinguish between can't-find-it and can't-survive-importing-it errors? – Cholentconda
? – Glenine