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

前端 未结 2 2077
别那么骄傲
别那么骄傲 2021-01-22 02:07

I having trouble installing PhantomJS to my project Following the suggestions from the similar question from so I defined the $PATH variable with executable path

2条回答
  •  醉酒成梦
    2021-01-22 02:52

    You need to give the path:

    browser = webdriver.PhantomJS(executable_path='Complete path/to/phantomjs')
    

    To find it use export PATH=${PATH:+$PATH:} in the command line as @Anderson commented.

提交回复
热议问题