Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
360 views
in Technique[技术] by (71.8m points)

google chrome - 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-32python.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('
', '
');f.close();exec(compile(code, __file__, 'exec'))" install --record C:UsersAdministratorAppDataLocalTemppip-i7ipagdt-recordinstall-record.txt --single-version-externally-managed --compile" failed with error code 1 in C:UsersWilliamAppDataLocalTemppip-build-js539jmrchromedriver

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?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

Just download one from here and access it in your code like this (let's assume you saved it to the desktop):

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

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...