pip install问题解决方案

问题描述

pip install时出现问题如下

(venvop) E:\worksp_py\langchain>pip install langchain
Looking in indexes: http://mirrors.aliyun.com/pypi
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 all
ow it anyway with '--trusted-host mirrors.aliyun.com'.
ERROR: Could not find a version that satisfies the requirement langchain (from versions: none)
ERROR: No matching distribution found for langchain
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 all
ow it anyway with '--trusted-host mirrors.aliyun.com'.

网上百度到的解决方法都是在每一次命令后加-i http://pypi.douban.com/simple/ --trusted-host pypi.douban.com
但是这样太麻烦了,且只是临时解决
后续经过寻找找到了这个方法来修改pip源文件

pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple/

常用的镜像地址:

https://mirrors.aliyun.com/pypi/simple/ 阿里云
https://pypi.mirrors.ustc.edu.cn/simple/ 中国科技大学
https://pypi.douban.com/simple/ 豆瓣
https://pypi.tuna.tsinghua.edu.cn/simple/ 清华大学
http://pypi.mirrors.ustc.edu.cn/simple/ 中国科学技术大学
posted @   晓枫的春天  阅读(1044)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· 无需6万激活码!GitHub神秘组织3小时极速复刻Manus,手把手教你使用OpenManus搭建本
· C#/.NET/.NET Core优秀项目和框架2025年2月简报
· 一文读懂知识蒸馏
· Manus爆火,是硬核还是营销?
· 终于写完轮子一部分:tcp代理 了,记录一下
点击右上角即可分享
微信分享提示