Anacond下载库出现的问题及解决现方法(已成功下载beautifulsoup4库和selenium库)

最近下载安装包时出现了一些问题,与大家共同分享,欢迎讨论。

下载beautifulsoup4库

conda install beautifulsoup4

但回车运行后出现了以下错误:

Collecting package metadata (current_repodata.json): failed

CondaHTTPError: HTTP 429 TOO MANY REQUESTS for url <https://mirrors.ustc.edu.cn/anaconda/pkgs/free/win-64/current_repodata.json>
Elapsed: 00:46.246376

An HTTP error occurred when trying to retrieve this URL.
HTTP errors are often intermittent, and a simple retry will get you on your way.
'https//mirrors.ustc.edu.cn/anaconda/pkgs/free/win-64'

运行成功 :

按照https://blog.csdn.net/Sakura_Logic/article/details/108312146博客中的解决方法,输入:

pip install beautifulsoup4 -i  http://mirrors.aliyun.com/pypi/simple/ --trusted-host mirrors.aliyun.com

 得到了解决,运行成功结果如下:

下载selenium库

 替换包名按照上述步骤进行下载出现了报错:

pip install selenium -i  http://mirrors.aliyun.com/pypi/simple/ --trusted-host mirrors.aliyun.comun.com



Looking in indexes: http://mirrors.aliyun.com/pypi/simple/
WARNING: The repository located at mirrors.aliyun.com is not a trusted or secure host and is being ignored. If this repository is available via HTTPS we recommend you use HTTPS instead, otherwise you may silence this warning and allow it anyway with '--trusted-host mirrors.aliyun.com'.
ERROR: Could not find a version that satisfies the requirement selenium (from versions: none)
ERROR: No matching distribution found for selenium

不太理解哪里出现了问题,于是开始寻找解决方法

尝试1:修改链接,更改镜像源
pip install selenium -i  https://pypi.tuna.tsinghua.edu.cn/simple --trusted-host mirrors.aliyun.comun.com

换了好几个镜像源之后还是没有用,出现了新的错误

尝试2:按照网上的教程进行修改尝试,还是出现了很多报错
conda config --set channel_priority flexible
conda install selenium

尝试3:
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/
conda config --set show_channel_urls yes
conda install selenium

 结果

运行成功 :

 输出以下内容:

conda config --remove-key channels
conda install selenium

运行结果:

 最后总算是成功了,希望能对正在安装的人有点帮助!

  • 1
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值