Compiling a Python script
This is a message for Python experts. I want to create an executable program from a Python script, which I am importing "os" in the module. I've tried to use py2exe, however, when I compile, via "python setup.py py2exe," I receive an error, "ImportError: No module named os." I also receive an error: "ImportError: No module named linecache," which I didn't call.
How would I include these modules, if they are required, or would another method of creating a stand-alone Python executable be advised, such as freeze.py?
Thanks,
Walter
Do you have add the python module path to the enviroment var PYTHONPATH? Normally you can find the basic modules like os in <Home_of_your_python_installation>\lib . Make sure that this directories are set to your PYTHONPATH-variable.
For some more detailed infos take a look into this didscussion:
How to change sys.path.
Kimmi
For some more detailed infos take a look into this didscussion:
How to change sys.path.
Kimmi
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement