这个问题已经被提过很多次了,但不幸的是,除了我一个人(一开始),没有一个是我的问题。How to use pyInstaller to completely pack all the necessary Library?
我使用多个库用Python编写了一个脚本,其中一个是webbot模块。我设法将我的脚本转换为.exe文件,但当我尝试运行.exe时,出现了以下错误:
Traceback (most recent call last):
File "TM.py", line 132, in <module>
File "site-packages\webbot\webbot.py", line 45, in __init__
FileNotFoundError: [WinError 3]The system could not find the path...然后,我按照上面链接中的说明进行操作。
然后,我得到了以下错误消息:
Traceback (most recent call last):
File "TM3.py", line 12, in <module>
AttributeError: module 'webbot' has no attribute 'data'
[9292] Failed to execute script TM3其中,第12行是:
webbot.data.path.append(r'webbot_master_data')有人能帮我一下吗?
提前感谢
使用:
Windows: 10
PyInstaller: 3.4
Python: 3.6.5
发布于 2018-11-11 23:21:09
在本例中,我所要做的就是将webbot模块的文件复制到创建.exe文件的同一文件夹中。其他模块可能也保存在这个文件夹中。
在将文件复制到那里之后,执行应该会运行。然而,这可能更多的是一种变通而不是解决方案,所以我不会接受我的答案作为答案。
https://stackoverflow.com/questions/52292099
复制相似问题