conda虚拟环境chromedriver放置位置

配置虚拟环境路径
本文介绍如何将特定的Python虚拟环境的Scripts文件夹加入到系统的路径中。通过将虚拟环境的Scripts目录放置在指定位置(例如C:UsersCADAppDataLocalcondacondaenvs),可以方便地管理不同项目的依赖。

C:\Users\CAD\AppData\Local\conda\conda\envs 放到对应虚拟环境的文件夹的Scripts文件夹下面



D:\devTools\conda\python.exe E:\shuju\jinjie\电影票房.py Traceback (most recent call last): File "D:\devTools\conda\Lib\site-packages\selenium\webdriver\common\driver_finder.py", line 67, in _binary_paths output = SeleniumManager().binary_paths(self._to_args()) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\devTools\conda\Lib\site-packages\selenium\webdriver\common\selenium_manager.py", line 55, in binary_paths return self._run(args) ^^^^^^^^^^^^^^^ File "D:\devTools\conda\Lib\site-packages\selenium\webdriver\common\selenium_manager.py", line 129, in _run raise WebDriverException( selenium.common.exceptions.WebDriverException: Message: Unsuccessful command executed: D:\devTools\conda\Lib\site-packages\selenium\webdriver\common\windows\selenium-manager.exe --browser chrome --language-binding python --output json; code: 65 {'code': 65, 'message': 'error sending request for url (https://googlechromelabs.github.io/chrome-for-testing/known-good-versions-with-downloads.json)', 'driver_path': '', 'browser_path': ''} The above exception was the direct cause of the following exception: Traceback (most recent call last): File "E:\shuju\jinjie\电影票房.py", line 9, in <module> driver = webdriver.Chrome(options=options) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\devTools\conda\Lib\site-packages\selenium\webdriver\chrome\webdriver.py", line 45, in __init__ super().__init__( File "D:\devTools\conda\Lib\site-packages\selenium\webdriver\chromium\webdriver.py", line 50, in __init__ if finder.get_browser_path(): ^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\devTools\conda\Lib\site-packages\selenium\webdriver\common\driver_finder.py", line 47, in get_browser_path return self._binary_paths()["browser_path"] ^^^^^^^^^^^^^^^^^^^^ File "D:\devTools\conda\Lib\site-packages\selenium\webdriver\common\driver_finder.py", line 78, in _binary_paths raise NoSuchDriverException(msg) from err selenium.common.exceptions.NoSuchDriverException: Message: Unable to obtain driver for chrome; For documentation on this error, please visit: https://www.selenium.dev/documentation/webdriver/troubleshooting/errors/driver_location Process finished with exit code 1
06-20
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值