Python遇到的问题及解决办法

1.下载安装依赖库时显示未找到版本:

    Could not find a version that satisfies the requirement 第三方库名(from version:)   No matching distribution found for 第三方库名

则可以使用国内镜像源加速方法来安装

清华:https://pypi.tuna.tsinghua.edu.cn/simple

阿里云:http://mirrors.aliyun.com/pypi/simple/

中国科技大学 https://pypi.mirrors.ustc.edu.cn/simple/

华中理工大学:http://pypi.hustunique.com/

山东理工大学:http://pypi.sdutlinux.org/ 

豆瓣:http://pypi.douban.com/simple/

可以在使用pip的时候加参数-i https://pypi.tuna.tsinghua.edu.cn/simple
例如:pip install -i https://pypi.tuna.tsinghua.edu.cn/simple pyspider,这样就会从清华这边的镜像去安装pyspider库。

但不一定会成功


猜你喜欢

转载自blog.csdn.net/qq_26658517/article/details/80941540