Strange PYTHONPATH problem

Posted by DoxaLogos on Stack Overflow See other posts from Stack Overflow or by DoxaLogos
Published on 2011-01-01T01:17:31Z Indexed on 2011/01/01 1:53 UTC
Read the original article Hit count: 141

Filed under:
|
|

I recently updated my python installation to 2.7 (previously 2.5), and I've noticed a strange problem where I cannot import certain modules that I created. I had no problem before. Normally, I edit the PYTHONPATH and add the directory I want to import modules. For some strange reason, I can no longer import. I checked my path in PYTHONPATH, and it looked correct.

When I display the sys.path in an interpreter, I see the current directory prepended to every PYTHONPATH entry(i.e. 'c:\blah\blah c:\path\to\module')

If I edit the sys.path by appending the directory that I want at the end of the list,everything works fine(i.e. 'c:\path\to\module\'). I never had to do this before.

I'm on Windows 7 on two computers.

Has anyone else had similar trouble?

© Stack Overflow or respective owner

Related posts about python

Related posts about import