pythoner
pythoner

Reputation: 15

ImportError: No module named os when Running .exe file py2exe

I've created an .exe of my python file. When I run the .exe file I get the following error message:

Traceback (most recent call last):

File "C:---\Anaconda2\lib\site-packages\py2exe\boot_common.py", line 92, in

import linecache

ImportError: No module named linecache

Traceback (most recent call last):

File "mypythonfile.py", line 8, in

ImportError: No module named os'

Upvotes: 0

Views: 764

Answers (1)

Bharath Bh
Bharath Bh

Reputation: 1

Delete the . exe file and just run (x is package)

pip install x
pip install module 

Then create again the executable file with pyinstaller. It worked for me.

Upvotes: 0

Related Questions