This is not a problem of Cygwin itself. The root cause of the problem is that I installed both in Win32 version and Cygwin version on my machine. The PYTHONHOME environment variable in Windows point to c:\python24. After remove this environment variable, the Cygwin version python's sys.path become correct. Override the environment variable in Cygwing is also Ok.
----- Original Message ----- From: "Jason Tishler" <[EMAIL PROTECTED]> To: "Wang Shuhao" <[EMAIL PROTECTED]> Cc: "Python-List" <python-list@python.org> Sent: Wednesday, January 24, 2007 11:23 PM Subject: Re: sys.path issue in cygwin > Wang, > > Please keep your replies on-list. > > On Wed, Jan 24, 2007 at 10:28:51PM +0800, Wang Shuhao wrote: >> > Why not use the Python that is part of the standard Cygwin >> > distribution? >> > >> Cause the Cygwin version python has the same problem, that why I try >> to build python from source. > > The above implies that you may have a Cygwin installation problem that > may impact other Cygwin applications too. I recommend taking this > problem to the Cygwin list: > > http://cygwin.com/problems.html > > FWIW, I get the following with the official Cygwin Python version: > > $ python -c 'import sys; print sys.path' > ['', '/usr/lib/python24.zip', '/usr/lib/python2.4', > '/usr/lib/python2.4/plat-cygwin', '/usr/lib/python2.4/lib-tk', > '/usr/lib/python2.4/lib-dynload', '/usr/lib/python2.4/site-packages'] > >> But finally I found the solution, the PYTHONHOME environment variable >> controls the content of initial sys.path. Thanks anyway. >> export PYTHONHOME=/usr/localWang Shuhao > > IMO, the above is just a workaround, not a solution. > > Jason > > -- > PGP/GPG Key: http://www.tishler.net/jason/pubkey.asc or key servers > Fingerprint: 7A73 1405 7F2B E669 C19D 8784 1AFD E4CC ECF4 8EF6 > -- http://mail.python.org/mailman/listinfo/python-list