美文网首页
python安装第三方库

python安装第三方库

作者: 桃李不言的蹊 | 来源:发表于2023-04-26 17:11 被阅读0次

1.当python执行脚本找不到库的时候,需要安装库: pip install xxxx 或则pip install python-xxxx 如果要带版本号 pip install xxx==1.2.0
2.python库搜索网址: https://pypi.org/search/?q=colorama
3.安装第三方库报错:如下

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

尝试切换pip源:

   1、pip3 install 安装包名字 -i http://pypi.doubanio.com/simple/ --trusted-host pypi.doubanio.com //豆瓣镜像网站
  2、pip3 install 安装包名字 -i http://pypi.douban.com/simple/ --trusted-host pypi.douban.com //豆瓣
  3、pip3 install 安装包名字 -i https://pypi.tuna.tsinghua.edu.cn/simple/ --trusted-host pypi.tuna.tsinghua.edu.cn //清华大学
  4、pip3 install 安装包名字 -i http://mirrors.aliyun.com/pypi/simple/ --trusted-host mirrors.aliyun.com  //阿里云
  5、pip3 install 安装包名字 -i https://pypi.mirrors.ustc.edu.cn/simple/ --trusted-host pypi.mirrors.ustc.edu.cn  //中国科技大学
  6、pip3 install 安装包名字 -i http://pypi.mirrors.ustc.edu.cn/simple/ --trusted-host pypi.mirrors.ustc.edu.cn  //中国科学技术大学

相关文章

网友评论

      本文标题:python安装第三方库

      本文链接:https://www.haomeiwen.com/subject/ohivjdtx.html