Bootstrap

​Looking in indexes: Simple Index Collecting langchain ERROR: HTTP error 403 while getting https://

(py311) PS D:\桌面文件\Part4_LLM-Chat\code> pip install langchain

Looking in indexes: Simple Index Collecting langchain ERROR: HTTP error 403 while getting https://pypi.tuna.tsinghua.edu.cn/packages/83/d4/f70ddcd14a1c9401367c601380e1204c6cfc948d7a46a4a274d3c03f1526/langchain-0.3.13-py3-none-any.whl (from Links for langchain) (requires-python:<4.0,>=3.9) ERROR: Could not install requirement langchain from https://pypi.tuna.tsinghua.edu.cn/packages/83/d4/f70ddcd14a1c9401367c601380e1204c6cfc948d7a4 6a4a274d3c03f1526/langchain-0.3.13-py3-none-any.whl because of HTTP error 403 Client Error: Forbidden for url: https://pypi.tuna.tsinghua.edu.cn /packages/83/d4/f70ddcd14a1c9401367c601380e1204c6cfc948d7a46a4a274d3c03f1526/langchain-0.3.13-py3-none-any.whl for URL https://pypi.tuna.tsinghu a.edu.cn/packages/83/d4/f70ddcd14a1c9401367c601380e1204c6cfc948d7a46a4a274d3c03f1526/langchain-0.3.13-py3-none-any.whl (from Links for langchain) (requires-python:<4.0,>=3.9)

solution:

出现这个 HTTP error 403 错误表示禁止访问,也就是你在尝试从清华镜像源(pypi | 镜像站使用帮助 | 清华大学开源软件镜像站 | Tsinghua Open Source Mirror )安装 langchain 时被服务器拒绝了,可能有以下几种解决办法:

更换镜像源

尝试更换为其他的国内镜像源或者官方源来安装,比如使用阿里云镜像源或者豆瓣源等。以下是以阿里云镜像源为例的安装命令:

pip install langchain -i https://mirrors.aliyun.com/pypi/simple/
;