PythonAnywhere-';phantomjs.exe';可执行文件需要在路径中
我主持了一个项目与Pythonywhere在线。其中一个文件使用phantomjs来刮取网页(我将phantomjs.exe与所有其他文件一起上传到文件夹中)。当我运行使用phantomjs的文件时,我得到以下错误:PythonAnywhere-';phantomjs.exe';可执行文件需要在路径中,python,phantomjs,pythonanywhere,Python,Phantomjs,Pythonanywhere,我主持了一个项目与Pythonywhere在线。其中一个文件使用phantomjs来刮取网页(我将phantomjs.exe与所有其他文件一起上传到文件夹中)。当我运行使用phantomjs的文件时,我得到以下错误: selenium.common.exceptions.WebDriverException: Message: 'phantomjs.exe' executable needs to be in PATH. 因此,问题是,我如何将phantomjs.exe添加到PythonAny
selenium.common.exceptions.WebDriverException: Message: 'phantomjs.exe' executable needs to be in PATH.
因此,问题是,我如何将
phantomjs.exe
添加到PythonAnywhere中的路径PythonAnywhere dev:不幸的是,phantomjs无法在我们的系统上工作:-(也许可以尝试在Firefox中使用Selenium?browser=webdriver.phantomjs(“您的路径”)我已经这样做了,但仍然不起作用。所有文件都在一个名为mm
的文件夹中,因此我将路径设置为browser=webdriver.PhantomJS('PhantomJS.exe')
请尝试添加完整路径!