sys.path after python 2.1?

Mark_Pryor erlangen72 at hotmail.com
Thu May 17 17:55:42 EDT 2001


Greg Copeland wrote in message ...
>
>Okay, I'm running an old installation of Mandrake.  I uninstalled
>python 1.5 and grabbed the 2.1 source tar balls.  I compiled and
>installed 2.1 without problem.  The tests seem to run without issue.
>I did notice that after installing 2.1, it said that my sys.path
>was not correct and that it should be manually modified.  In fact,
>the exact phrase is:
>
>warning: install: modules installed to '/usr/lib/python2.1/lib-dynload/',
>which is not in Python's module search path (sys.path) -- you'll have to
>change the search path yourself
>
>The real issue that I've noticed is that ANY module that is a
>shared object fails to load.  For example.  I can compile and
>install wxPython without problem, however, if I attempt to use
>the wx module, it says that it's not found.  I've tried messing
>around with various items here and there, no matter what, I
>can't seem to get it to function.  This doesn't only include
>site modules, rather, even something as simple as importing
>crypt of zlib fails with: ImportError: No module named <module>.
>
>I have some old code that fails to.  It says: ImportError: No module named time.
>The odd thing is that time is being imported from the socket module.
>
>I didn't have this problem with 1.5.  What's the deal?  Help!  Where
>do I need to make these changes.

Hi,
On Windows I do this:

# from an interactive shell
    import sys
    import os
    sys.path[0] = ''    # remove the / in path
< end snip>

hth,
Mark Pryor
pgp KeyID: 0x1A966EC5

>
>
>Thanks,
> Greg
>
>
>-- 
>Greg Copeland, Principal Consultant
>Copeland Computer Consulting
>--------------------------------------------------
>PGP/GPG Key at http://www.keyserver.net
>DE5E 6F1D 0B51 6758 A5D7  7DFE D785 A386 BD11 4FCD
>--------------------------------------------------
>




More information about the Python-list mailing list