ImportError: "No Module named xxx"

Robert Dailey rcdailey at gmail.com
Fri Jul 6 15:31:56 EDT 2007


I created a basic python file and made an attempt to execute it from
the command line, however it gives me a weird error after the python
file has been executed:

Traceback (most recent call last):
  File "C:\Python25\lib\runpy.py", line 87, in run_module
    raise ImportError("No module named " + mod_name)
ImportError: No module named compile.py


The command I executed was: "python -m compile.py" (compile.py is my
python script)

Can anyone help me figure out why it's doing this?




More information about the Python-list mailing list