简体   繁体   中英

Setting up chromedriver with selenium [python]

I am trying to set up chromedriver with selenium on Windows 10, but when I try to do

pip install chromedriver==2.11

I get this error

error: [Errno 13] Permission denied:'C:\\Users\\Administrator\\AppData\\Local\\Temp\\tmp8y9hyfk2'

----------------------------------------
Command ""c:\program files (x86)\python36-32\python.exe" -u -c "import setuptools, tokenize;__file__='C:\\Users\\William\\AppData\\Local\\Temp\\pip-build-js539jmr\\chromedriver\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record C:\Users\Administrator\AppData\Local\Temp\pip-i7ipagdt-record\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in C:\Users\William\AppData\Local\Temp\pip-build-js539jmr\chromedriver\

What do I do to get past this because I need to get webdriver set up as quickly as possible for my work. Downloading it online gave me the same error. I have looked and I have every permission that one can have for editing the files in question, so what could it be?

只需从此处下载一个文件,然后像这样在您的代码中访问它(假设您将其保存到桌面上):

driver = webdriver.Chrome('C:/Users/User/Desktop/chromedriver.exe')

The Chrome webdriver (and several others) come packaged with Selenium. The following opens a Chrome window:

import selenium
driver = selenium.webdriver.Chrome() 

You can see other packaged drivers with help(selenium.webdriver)

PACKAGE CONTENTS
    android (package)
    blackberry (package)
    chrome (package)
    common (package)
    edge (package)
    firefox (package)
    ie (package)
    opera (package)
    phantomjs (package)
    remote (package)
    safari (package)
    support (package)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM