这个问题已经提出很多次了,但不幸的是,我的情况只不过是一个(最初)。 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
答案 0 :(得分:0)
在这种情况下,我要做的只是将webbot模块的文件复制到创建.exe文件的同一文件夹中。其他模块也可以保存在此文件夹中。
将文件复制到此处后,应运行执行程序。但是,这可能是解决方法,而不是解决方案,所以我不会接受我的回答作为答案。