can't convert webbot script to an executable

假装没事ソ 提交于 2019-12-12 01:03:21

问题


I am trying to convert a python script which uses the webbot library for web automation.

As I tried to convert my running Python (3.6.5) script to an .exe file using pyinstaller I was getting an error that the path of the webbot module could not be found.

In order to overcome this problem I tried to specify the path of the module in the spec file, without success. An easier workaround suggests copying the downloaded folder webbot in the same folder where the .exe file is.

Its a very handy tool to use , i don't wanna ditch it .


回答1:


In order for this to work you should not convert it as one file like this

pyinstaller --onefile file.py

but like this

pyinstaller file.py

After doing this the .exe could be launched without any problems.

An other error was coming because of trying to import webbot in my script. Probably this is a noob mistake, but one has to:

from webbot import Browser


来源:https://stackoverflow.com/questions/53138328/cant-convert-webbot-script-to-an-executable

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!