There is only python2.2.3 on my machine, and the location is
/usr/local/lib/python2.2 . I say the 'C/lib/python2.2/' is a wrong path is
because the leading C/lib is not point to the location of my python
installation. I'v found the solution anyway. The environment variable
PYTHONHOME controls the content of the initial sys.path. put
export PYTHONHOME=/usr/local in .bash_profile will fix it.
----- Original Message -----
From: "Steve Holden" <[EMAIL PROTECTED]>
To: <python-list@python.org>
Sent: Wednesday, January 24, 2007 9:42 PM
Subject: Re: sys.path issue in cygwin
> Wang Shuhao wrote:
>>
>>
>> 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.
>>
>>
>>
> Why "obviously"? 2.2.3 and 2.2.2 aren't meant to coexist, so one will
> install over the other. So the directories you are seeing are what would
> be used with standard prefix settings.
>
> If you mean "obviously because I used a setting to configure the
> prefixes for loading from a specific directory" then perhaps you are
> suffering from having set your Windows PATH. If you *don't* set your
> Windows PATH do you see it using the "2.2.3" variants?
>
> Did you run "make install"?
>
> Just a couple of random thoughts ... are you even sure that running the
> "python" command does run your new 2.2.3 binary?
>
> regards
> Steve
> --
> Steve Holden +44 150 684 7255 +1 800 494 3119
> Holden Web LLC/Ltd http://www.holdenweb.com
> Skype: holdenweb http://del.icio.us/steve.holden
> Blog of Note: http://holdenweb.blogspot.com
>
>
--------------------------------------------------------------------------------
> --
> http://mail.python.org/mailman/listinfo/python-list
--
http://mail.python.org/mailman/listinfo/python-list