No module named os

Scott David Daniels Scott.Daniels at Acm.Org
Sat Oct 10 20:12:05 EDT 2009


smitty at home.com wrote:
> 'import site' failed; use -v for traceback
> Traceback (most recent call last):
>   File "./setup.py", line 3, in <module>
>     import sys, os, glob
> ImportError: No module named os
> 
> 
> I'm trying to build a small program and I get the above error.
> I have had this error popup in the past while trying to build other
> programs. What can I do?
> 
> Thanks

Go to a command line and type:
     $ python -v setup.py
which will tell you which includes are tried in which order.
If this doesn't make it painfully obvious, try:
     $ python -v -v setup.py
which will tell you what locations are being checked for files.

Normally you should:
   1) tell us python version and which OS (and OS version) you are using.
   2) include a pasted copy of exactly what did not work, along with the
      resulting output, and why you did not expect the output you got.

--Scott David Daniels
Scott.Daniels at Acm.Org



More information about the Python-list mailing list