Python Mac:Selenium错误、权限错误和Selenium.common.exceptions.WebDriverException

Python Mac:Selenium错误、权限错误和Selenium.common.exceptions.WebDriverException,python,selenium,selenium-webdriver,Python,Selenium,Selenium Webdriver,错误是 /Users/erwinmac1/PycharmProjects/MachineLearning/venv/bin/python /Users/erwinmac1/PycharmProjects/MachineLearning/main.py Traceback (most recent call last): File "/Users/erwinmac1/PycharmProjects/MachineLearning/venv/lib/python3.8/site-pac

错误是

/Users/erwinmac1/PycharmProjects/MachineLearning/venv/bin/python /Users/erwinmac1/PycharmProjects/MachineLearning/main.py
Traceback (most recent call last):
  File "/Users/erwinmac1/PycharmProjects/MachineLearning/venv/lib/python3.8/site-packages/selenium/webdriver/common/service.py", line 72, in start
    self.process = subprocess.Popen(cmd, env=self.env,
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/subprocess.py", line 854, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/subprocess.py", line 1702, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
PermissionError: [Errno 13] Permission denied: '/Users/erwinmac1/Desktop/Chrome zip'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Users/erwinmac1/PycharmProjects/MachineLearning/main.py", line 6, in <module>
    driver = webdriver.Chrome(PATH)
  File "/Users/erwinmac1/PycharmProjects/MachineLearning/venv/lib/python3.8/site-packages/selenium/webdriver/chrome/webdriver.py", line 73, in __init__
    self.service.start()
  File "/Users/erwinmac1/PycharmProjects/MachineLearning/venv/lib/python3.8/site-packages/selenium/webdriver/common/service.py", line 86, in start
    raise WebDriverException(
selenium.common.exceptions.WebDriverException: Message: 'Chrome zip' executable may have wrong permissions. Please see https://sites.google.com/a/chromium.org/chromedriver/home
我不知道为什么这会显示一个错误,我已经重新安装了好几次,但它仍然显示这个错误。有什么帮助吗?

您的路径无效(path=“/Users/erwinmac1/Desktop/Chrome-zip”)


转到桌面,将chromedriver的名称编辑为chromedriver并刷新项目,然后重新运行

欢迎使用SO。
路径
是zip文件的路径吗?如果是这样的话,它不应该是实际chromedriver二进制文件的路径吗?您想要的是chromedriver.exe的路径而不是zip。