3

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?

asked Jan 1, 2011 at 1:17

1 Answer 1

1

Think I found the problem. Somehow I had added the some of the python standard libraries into PYTHONPATH. Once I removed those, everything works fine.

answered Jan 1, 2011 at 2:58
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.