一.报错1
Try to run this command from the system terminal. Make sure that you use the correct version of ‘pip’ installed for your Python interpreter located at ‘D:\PyCode\venv\Scripts\python.exe’.
解决办法:升级pip pip install –upgrade pip -i https://pypi.tuna.tsinghua.edu.cn/simple/
二.报错二
ERROR: Could not install packages due to an OSError: HTTPSConnectionPool(host=’files.pythonhosted.org’, port=443): Max retries exceeded with url: /packages/ad/13/481aa476a9bcfec0bf74140a4c395dede0569cf56dc773abec181f95e30f/selenium-4.8.2-py3-none-any.whl (Caused by ConnectTimeoutError(<pip._vendor.urllib3.connection.HTTPSConnection object at 0x1052a0be0>, ‘Connection to files.pythonhosted.org timed out. (connect timeout=15)’))
解决办法:更换镜像源pip3 install selenium -i https://pypi.douban.com/simple/ –trusted-host pypi.douban.com