python 安装paramiko

 转自:https://blog.csdn.net/qq_40024178/article/details/108602688

pip install  paramiko  --index-url http://pypi.douban.com/simple/    --trusted-host pypi.douban.com

Could not fetch URL https://pypi.tuna.tsinghua.edu.cn/simple/numpy/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.tuna.tsingh
ua.edu.cn', port=443): Max retries exceeded with url: /simple/numpy/ (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate
verify failed: self signed certificate in certificate chain (_ssl.c:1056)'))) - skipping

问题解决: 增加--trusted-host pypi.douban.com

正确命令:

  • pip install xxx --index-url http://pypi.douban.com/simple/ --trusted-host pypi.douban.com

注解:

  • 1. pip install 表示通过pip 来安装某种包
  • 2. xxx 表示你要安装的包名,比如pipenv,jupyter等等
  • 3. -i http://pypi.douban.com/simple 表示将镜像地址切换为国内,这里切换到了豆瓣
  • 4.--trusted-host pypi.douban.com 表示将指定网站设置为信任服务器

国内镜像地址:

常用的镜像地址有:

  • 1)http://mirrors.aliyun.com/pypi/simple/ 阿里云
  • 2)https://pypi.mirrors.ustc.edu.cn/simple/ 中国科技大学
  • 3) http://pypi.douban.com/simple/ 豆瓣
  • 4) https://pypi.tuna.tsinghua.edu.cn/simple/ 清华大学
  • 5) http://pypi.mirrors.ustc.edu.cn/simple/ 中国科学技术大学

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章