【发布时间】:2017-11-05 20:44:45
【问题描述】:
我通过以下步骤在我的谷歌云集群上打开了 jupyter notebook:https://cloud.google.com/dataproc/docs/tutorials/jupyter-notebook 现在我收到这段代码的错误:
import selenium
from contextlib import closing
from selenium.webdriver import PhantomJS
with closing(PhantomJS()) as browser:
#some further code
我收到以下错误消息:
WebDriverException:消息:“phantomjs”可执行文件需要在 PATH 中。
现在在我自己的环境中,当我遇到这个错误时,我通过在我的系统变量中添加我的 phantomjs.exe 的路径来修复它。 但是现在当我在谷歌云集群环境中时,我正在寻找另一种添加 phantomjs.exe 路径的方法。任何其他解决方案也将不胜感激。
【问题讨论】:
标签: python-3.x selenium-webdriver jupyter-notebook google-cloud-dataproc executable-path