py2exe创建的exe给出“ ImportError:”

时间:2018-07-27 07:08:44

标签: python-2.7 selenium importerror py2exe

我正在尝试使用py2exe将我的“ whats3.py”文件转换为可执行文件。我已经成功创建了exe,但是当我尝试运行此可执行文件时,它会显示错误

File "C:\Python27\lib\site-packages\py2exe\boot_common.py", line 92, in <module>
    import linecache
ImportError: No module named linecache
Traceback (most recent call last):
  File "whats3.py", line 1, in <module>
ImportError: No module named selenium

我已经检查了c:/驱动器中的Python27文件夹,并且其中存在硒(我很确定安装正确)

我按照py2exe的要求使用python 2.7。

我该如何解决"No module named selenium" screen shot of my python folder in c drive的错误

screen shot of cmd window with error on running whats3.exe

screenshot of my dist folder after creating my exe

0 个答案:

没有答案