【问题标题】:Can PhantomJS be used with py2exe?PhantomJS 可以与 py2exe 一起使用吗?
【发布时间】:2014-05-05 22:13:08
【问题描述】:

我正在我的计算机上运行使用 PhantomJS 的 wxPython exe。但是,在我将其发送到另一台计算机后,它会给出以下错误。如果这是 Python 库中的标准包或模块,我将能够弄清楚这一点,但 PhantomJS 似乎相当复杂。我是否需要在我的 py2exe 设置中包含一些内容才能使 phantomjs.exe 与我的应用程序一起使用?还是我只是将 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 

非常感谢!没有太多关于 py2exe 和 phantomjs 的信息。

【问题讨论】:

  • 第二台计算机上是否有 phantomjs.exe 最好在 PATH 中?

标签: python wxpython phantomjs py2exe


【解决方案1】:

为了解决这个问题,我通过py2exe找不到解决方案,所以我手动将phantomjs的路径更改为“phantomjs.exe”,然后手动将其复制到我的分发文件夹中。然后我将其压缩并运送给最终用户。

【讨论】:

    猜你喜欢
    • 2010-12-12
    • 1970-01-01
    • 2013-03-22
    • 2013-05-24
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多