I've just installed pylint via the Cygwin package installer, and can run it from the bash command line on any .py file. But if I try to programatically import it inside a Python session, it fails:
>>> import pylint
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named pylint
However, if I do the following steps (which I found inside the pylint command line utility file), it works:
>>> __requires__ = 'pylint==1.3.1'
>>> from pkg_resources import load_entry_point
>>> import pylint
>>> pylint.__file__
'/usr/lib/python2.7/site-packages/pylint-1.3.1-py2.7.egg/pylint/__init__.pyc'
I don't have to do the extra steps on the few linux systems I tested. Why do I have to perform extra steps in Cygwin?
For informational purposes, here is my sys.path:
$ python -c "import sys; print '\n'.join(sys.path)"
/usr/lib/python2.7/site-packages/logilab_common-0.62.0-py2.7.egg
/home/lance/sdp/prereqs/python/lib/python
/usr/lib/python27.zip
/usr/lib/python2.7
/usr/lib/python2.7/plat-cygwin
/usr/lib/python2.7/lib-tk
/usr/lib/python2.7/lib-old
/usr/lib/python2.7/lib-dynload
/usr/lib/python2.7/site-packages
/usr/lib/python2.7/site-packages