1

when i write import win32print in my python command line (IDLE) it works fine and it is imported... but when i write import win32print in my py file then it gives an error says no module named win32print

why am i not able to load the module when writing the same statement in a py script...im using windows XP

asked Feb 7, 2011 at 16:46
2
  • It looks like win32print is not installed when you run your .py file, but it is from IDLE. Is your path to Python using a different Python installation? Commented Feb 7, 2011 at 16:51
  • yes that exactly was the problem... Commented Feb 9, 2011 at 6:47

1 Answer 1

6

Check if you are running on the same installation. I'd do that by looking the path:

import sys
print sys.path

And compare the output on IDLE and when you run the .py

answered Feb 7, 2011 at 16:56
Sign up to request clarification or add additional context in comments.

1 Comment

thank you...i was actually running python 2.6 on idle and 2.5 to compile my script...

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.