简体   繁体   English

PhantomJS可以与py2exe一起使用吗?

[英]Can PhantomJS be used with py2exe?

I'm running my wxPython exe that uses PhantomJS fine on my computer. 我正在运行在我的计算机上很好使用PhantomJS的wxPython exe。 However, after I send it over to another computer, it gives the error below. 但是,将其发送到另一台计算机后,它显示以下错误。 If this was a standard package or module in the Python library, I would be able to figure this out but PhantomJS is quite complex it seems. 如果这是Python库中的标准软件包或模块,我可以弄清楚,但是PhantomJS看起来很复杂。 Do I need to include something in my py2exe settings to make phantomjs.exe to work with my app? 我是否需要在py2exe设置中包含某些内容才能使phantomjs.exe与我的应用一起使用? Or do I just include the phantomjs.exe in my dist folder? 还是只将phantomjs.exe包含在dist文件夹中?

File "selenium\webdriver\phantomjs\webdriver.pyc", line 50, in __init__
File "selenium\webdriver\phantomjs\service.pyc", line 67, in start
WebDriverException: Message: 'Unable to start phantomjs with ghostdriver.' ; Screenshot: available via screen 

Thanks so much! 非常感谢! There's not much info about py2exe and phantomjs available. 有关py2exe和phantomjs的信息不多。

To fix this, I couldn't find a solution through py2exe, so I manually changed the path of phantomjs to "phantomjs.exe" and then manually copied it into my distribution folder. 要解决此问题,我无法通过py2exe找到解决方案,因此我将phantomjs的路径手动更改为“ phantomjs.exe”,然后将其手动复制到我的分发文件夹中。 I then zipped it and it shipped to the end user fine. 然后,我将其压缩并发送给最终用户。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM