PhantomJS with Selenium error: Message: 'phantomjs' executable needs to be in PATH

后端 未结 7 1847
灰色年华
灰色年华 2020-12-05 13:59

I am attempting to run this script:

https://github.com/Chillee/coursera-dl-all

However, the script fails at the line session = webdriver.PhantomJS()

相关标签:
7条回答
  • 2020-12-05 14:53

    1.Download Phantomjs executable from https://phantomjs.org/download.html 2. copy phantomjs.exe to C:\Python27\Lib\site-packages\selenium\webdriver\phantomjs 3. Add path C:\Python27\Lib\site-packages\selenium\webdriver\phantomjs under environment variable key "PATH"

    since I am using PyCharm I had to restart Pycharm after above settings are done

    0 讨论(0)
提交回复
热议问题