
为加快安装进度,可以更换为国内的源,如清华大学源
pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple如果采用默认的方式安装,会安装最新版本的。
C:\Users\GUO>pip install selenium
Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple
Collecting selenium
Downloading https://pypi.tuna.tsinghua.edu.cn/packages/d9/4c/d18374c7652b575c93838ffa728415826ae6108156b65e96344922130e9e/selenium-4.8.0-py3-none-any.whl (6.3 MB)
---------------------------------------- 6.3/6.3 MB 3.2 MB/s eta 0:00:00
Collecting trio~=0.17
Downloading https://pypi.tuna.tsinghua.edu.cn/packages/f1/ed/3623a910f9bb7a31b067d6baef476ed6e294e92a245f94ab992988e4a666/trio-0.22.0-py3-none-any.whl (384 kB)
---------------------------------------- 384.9/384.9 kB 2.7 MB/s eta 0:00:00
Collecting trio-websocket~=0.9
Downloading https://pypi.tuna.tsinghua.edu.cn/packages/db/c5/b5e8bc1f40568a354f2a9cc296b8892605a9d2f22e725290fc33836dd2a3/trio_websocket-0.9.2-py3-none-any.whl (16 kB)
Collecting certifi>=2021.10.8
Downloading https://pypi.tuna.tsinghua.edu.cn/packages/71/4c/3db2b8021bd6f2f0ceb0e088d6b2d49147671f25832fb17970e9b583d742/certifi-2022.12.7-py3-none-any.whl (155 kB)
---------------------------------------- 155.3/155.3 kB 2.3 MB/s eta 0:00:00
Collecting urllib3[socks]~=1.26
Downloading https://pypi.tuna.tsinghua.edu.cn/packages/fe/ca/466766e20b767ddb9b951202542310cba37ea5f2d792dae7589f1741af58/urllib3-1.26.14-py2.py3-none-any.whl (140 kB)
---------------------------------------- 140.6/140.6 kB 143.9 kB/s eta 0:00:00
Collecting attrs>=19.2.0
Downloading https://pypi.tuna.tsinghua.edu.cn/packages/fb/6e/6f83bf616d2becdf333a1640f1d463fef3150e2e926b7010cb0f81c95e88/attrs-22.2.0-py3-none-any.whl (60 kB)
---------------------------------------- 60.0/60.0 kB 3.3 MB/s eta 0:00:00
Collecting exceptiongroup>=1.0.0rc9
Downloading https://pypi.tuna.tsinghua.edu.cn/packages/e8/14/9c6a7e5f12294ccd6975a45e02899ed25468cd7c2c86f3d9725f387f9f5f/exceptiongroup-1.1.0-py3-none-any.whl (14 kB)
Collecting sortedcontainers
Downloading https://pypi.tuna.tsinghua.edu.cn/packages/32/46/9cb0e58b2deb7f82b84065f37f3bffeb12413f947f9388e4cac22c4621ce/sortedcontainers-2.4.0-py2.py3-none-any.whl (29 kB)
Collecting sniffio
Downloading https://pypi.tuna.tsinghua.edu.cn/packages/c3/a0/5dba8ed157b0136607c7f2151db695885606968d1fae123dc3391e0cfdbf/sniffio-1.3.0-py3-none-any.whl (10 kB)
Collecting idna
Downloading https://pypi.tuna.tsinghua.edu.cn/packages/fc/34/3030de6f1370931b9dbb4dad48f6ab1015ab1d32447850b9fc94e60097be/idna-3.4-py3-none-any.whl (61 kB)
---------------------------------------- 61.5/61.5 kB 3.2 MB/s eta 0:00:00
Collecting cffi>=1.14
Downloading https://pypi.tuna.tsinghua.edu.cn/packages/32/2a/63cb8c07d151de92ff9d897b2eb27ba6a0e78dda8e4c5f70d7b8c16cd6a2/cffi-1.15.1-cp37-cp37m-win_amd64.whl (179 kB)
---------------------------------------- 179.3/179.3 kB 11.3 MB/s eta 0:00:00
Collecting async-generator>=1.9
Downloading https://pypi.tuna.tsinghua.edu.cn/packages/71/52/39d20e03abd0ac9159c162ec24b93fbcaa111e8400308f2465432495ca2b/async_generator-1.10-py3-none-any.whl (18 kB)
Collecting outcome
Downloading https://pypi.tuna.tsinghua.edu.cn/packages/e9/4f/2f2d3f65d851852712b4de3fd0cfdcec9c5e9a9c347430e004ba770ef4db/outcome-1.2.0-py2.py3-none-any.whl (9.7 kB)
Collecting wsproto>=0.14
Downloading https://pypi.tuna.tsinghua.edu.cn/packages/78/58/e860788190eba3bcce367f74d29c4675466ce8dddfba85f7827588416f01/wsproto-1.2.0-py3-none-any.whl (24 kB)
Collecting PySocks!=1.5.7,<2.0,>=1.5.6
Downloading https://pypi.tuna.tsinghua.edu.cn/packages/8d/59/b4572118e098ac8e46e399a1dd0f2d85403ce8bbaad9ec79373ed6badaf9/PySocks-1.7.1-py3-none-any.whl (16 kB)
Collecting pycparser
Downloading https://pypi.tuna.tsinghua.edu.cn/packages/62/d5/5f610ebe421e85889f2e55e33b7f9a6795bd982198517d912eb1c76e1a53/pycparser-2.21-py2.py3-none-any.whl (118 kB)
---------------------------------------- 118.7/118.7 kB 178.1 kB/s eta 0:00:00
Collecting h11<1,>=0.9.0
Downloading https://pypi.tuna.tsinghua.edu.cn/packages/95/04/ff642e65ad6b90db43e668d70ffb6736436c7ce41fcc549f4e9472234127/h11-0.14.0-py3-none-any.whl (58 kB)
---------------------------------------- 58.3/58.3 kB 161.7 kB/s eta 0:00:00
Collecting typing-extensions
Downloading https://pypi.tuna.tsinghua.edu.cn/packages/0b/8e/f1a0a5a76cfef77e1eb6004cb49e5f8d72634da638420b9ea492ce8305e8/typing_extensions-4.4.0-py3-none-any.whl (26 kB)
Installing collected packages: sortedcontainers, urllib3, typing-extensions, sniffio, PySocks, pycparser, idna, exceptiongroup, certifi, attrs, async-generator, outcome, h11, cffi, wsproto, trio, trio-websocket, selenium
Successfully installed PySocks-1.7.1 async-generator-1.10 attrs-22.2.0 certifi-2022.12.7 cffi-1.15.1 exceptiongroup-1.1.0 h11-0.14.0 idna-3.4 outcome-1.2.0 pycparser-2.21 selenium-4.8.0 sniffio-1.3.0 sortedcontainers-2.4.0 trio-0.22.0 trio-websocket-0.9.2 typing-extensions-4.4.0 urllib3-1.26.14 wsproto-1.2.0
显示已安装软件包的版本号等信息
C:\Users\GUO>pip show selenium
Name: selenium
Version: 4.8.0
Summary:
Home-page: https://www.selenium.dev
Author:
Author-email:
License: Apache 2.0
Location: d:\python37\lib\site-packages
Requires: certifi, trio, trio-websocket, urllib3
Required-by:
卸载已安装的软件包
C:\Users\GUO>pip uninstall selenium
Found existing installation: selenium 4.8.0
Uninstalling selenium-4.8.0:
Would remove:
d:\python37\lib\site-packages\selenium-4.8.0.dist-info\*
d:\python37\lib\site-packages\selenium\*
Proceed (Y/n)? y
Successfully uninstalled selenium-4.8.0
安装指定版本的软件包
C:\Users\GUO>pip install selenium==3.141.0
Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple
Collecting selenium==3.141.0
Downloading https://pypi.tuna.tsinghua.edu.cn/packages/80/d6/4294f0b4bce4de0abf13e17190289f9d0613b0a44e5dd6a7f5ca98459853/selenium-3.141.0-py2.py3-none-any.whl (904 kB)
---------------------------------------- 904.6/904.6 kB 1.3 MB/s eta 0:00:00
Requirement already satisfied: urllib3 in d:\python37\lib\site-packages (from selenium==3.141.0) (1.26.14)
Installing collected packages: selenium
Successfully installed selenium-3.141.0
文章转载自云自由,如果涉嫌侵权,请发送邮件至:contact@modb.pro进行举报,并提供相关证据,一经查实,墨天轮将立刻删除相关内容。




