Reputation: 1
I opened jupyter notebook on my google cloud cluster with these steps: https://cloud.google.com/dataproc/docs/tutorials/jupyter-notebook Now I get an error on this piece of code:
import selenium
from contextlib import closing
from selenium.webdriver import PhantomJS
with closing(PhantomJS()) as browser:
#some further code
I get the following error message:
WebDriverException: Message: 'phantomjs' executable needs to be in PATH.
Now in my own environment when I got this error, I fixed it by adding the path to my phantomjs.exe in my system variables. But now while I am on the google cloud cluster environment, I am looking for another way to add the phantomjs.exe path. Any other solution would be appreciated aswell.
Upvotes: 0
Views: 485
Reputation: 1349
I have no experience with Selenium or PhantomJS. However since Dataproc runs on Debian 8 Jessie and not Windows, you probably want to run sudo apt-get install phantomjs
instead of using an exe. You could either install it manually after SSHing or in an initialization action.
Upvotes: 0