I recently upgraded my python installation to version 2.7 (previously 2.5), and I noticed a strange problem when I cannot import certain modules that I created. I had no problems before. Usually I edit PYTHONPATH and add the directory I want to import. For some strange reason, I can no longer import. I checked my way in PYTHONPATH and it looked right.
When I display sys.path in the interpreter, I see that the current directory is added to each PYTHONPATH entry (that is, "c: \ blah \ blah c: \ path \ to \ module")
If I edit sys.path to add the directory that I want at the end of the list, everything works fine (e.g. 'c: \ path \ to \ module \'). I have never had to do this before.
I am on Windows 7 on two computers.
Has anyone else had the same problem?
source
share