V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
推荐学习书目
Learn Python the Hard Way
Python Sites
PyPI - Python Package Index
http://diveintopython.org/toc/index.html
Pocoo
值得关注的项目
PyPy
Celery
Jinja2
Read the Docs
gevent
pyenv
virtualenv
Stackless Python
Beautiful Soup
结巴中文分词
Green Unicorn
Sentry
Shovel
Pyflakes
pytest
Python 编程
pep8 Checker
Styles
PEP 8
Google Python Style Guide
Code Style from The Hitchhiker's Guide
shinonome
V2EX  ›  Python

mac 的 chromedriver 安装遇到路径问题

  •  
  •   shinonome · 2022-03-19 11:38:06 +08:00 · 1690 次点击
    这是一个创建于 762 天前的主题,其中的信息可能已经有所发展或是发生改变。
    Chromedriver -v
    ChromeDriver 99.0.4844.17 (395f87df02eedda1d0e06d5ac0614b0eeb22a9e8-refs/branch-heads/4844@{#182})
    终端运行如下,然后在终端运行
    from selenium import webdriver

    brower = webdriver.Chrome()
    brower.get('https://www.google.com/')
    是没有报错的,但是在 pycharm 运行的话就会提示
    selenium.common.exceptions.WebDriverException: Message: 'chromedriver' executable needs to be in PATH.
    确确实实已经移动到 /usr/local/bin 了
    python 为 3.9 ,mac 为 12.3
    之前还正常打开的,今天尝试发现不行了
    2 条回复    2022-03-22 09:52:23 +08:00
    supersu
        1
    supersu  
       2022-03-19 11:59:43 +08:00 via Android
    https://www.sharpgan.com/implement-lagou-crawler/ 看下我这个博客,里面有方法不用搞 path 变量~
    tisswb
        2
    tisswb  
       2022-03-22 09:52:23 +08:00
    介绍一个新朋友 playwright for python 有了他,舅子啊也不用折腾 webdriver 了
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   2885 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 33ms · UTC 13:45 · PVG 21:45 · LAX 06:45 · JFK 09:45
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.