ModuleNotFoundError: No module named ‘selenium‘

文章讲述了在尝试使用pip安装Selenium时遇到的`ModuleNotFoundError`,并探索了通过不同镜像源和直接下载解压缩进行安装的方法,最后推荐了使用`pythonsetup.pyinstall`的终极解决方案。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

1. 安装selenium,命令行:

pip install -U selenium

报错:ModuleNotFoundError: No module named 'selenium'

2. 尝试各种镜像,还是报错,错误都一样:

pip install -U selenium -i https://pypi.org/project/selenium/

pip install selenium -i https://mirrors.aliyun.com/pypi --trusted-host mirrors.aliyun.com

pip install --index https://mirrors.ustc.edu.cn/pypi/web/simple/  selenium

python -m pip install selenium -i http://pypi.douban.com/simple/ --trusted-host pypi.douban.com

pip install selenium -i https://selenium-release.storage.googleapis.com

pip install selenium -i https://mirror.baidu.com/pypi/simple

报错信息:

ERROR: Could not find a version that satisfies the requirement selenium (from versions: none)
ERROR: No matching distribution found for selenium

3. 终极方案,直接下载解压缩,分分钟搞定。命令行:python setup.py install

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值