sys.path issue in cygwin

Wang Shuhao wangshuhao at sina.com
Wed Jan 24 02:58:02 EST 2007


I successfully built and installed Python 2.2.3 in cygwin. But there is something wrong in the sys.path. I use following statments for a test.

>>> import sys
>>> print sys.path
['', 'C/lib/python2.2/', 'C/lib/python2.2/plat-cygwin', 'C/lib/python2.2/lib-tk'
, '\\Python24/lib/python2.2/lib-dynload']
>>>

To keep the question simple, I've set PATH= in cygwin.bat to avoid python initialze sys.path from Windows' PATH environment.

Obviously, 'C/lib/python2.2/' is a wrong path. In fact my python is installed in /usr/local/lib/python2.2.3. The result of the issue is that when you run a program python can't find the module. So what I really want to know is where these path came from and how to fix it.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20070124/835eba3d/attachment.html>


More information about the Python-list mailing list