企业🤖AI Agent构建引擎,智能编排和调试,一键部署,支持私有化部署方案 广告
##### 国内镜像源 ##### # 清华: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 install -i 镜像地址 模块 会从指定的镜像地址安装模块 使用方式二(永久): Linux: 在~目录创建.pip/pip.conf ~~~ cd ~ mkdir .pip vim pip.conf ~~~ 在打开的pip.conf中加入,wq保存退出即可 ~~~ [global] index-url = https://mirrors.aliyun.com/pypi/simple/ [install] trusted-host=mirrors.aliyun.com ~~~ Windows: 在用户目录即C:\user/xxx/目录中创建pip文件夹,不带. ,在文件夹中创建pip.ini,打开pip.ini,加入 ~~~ [global] index-url = https://mirrors.aliyun.com/pypi/simple/ [install] trusted-host=mirrors.aliyun.com ~~~ Docker: 在Dockerfile文件中增加以下配置: ``` # Set pip repolist RUN mkdir /root/.pip COPY pip.conf /root/.pip/ ``` 创建pip.conf,打开pip.conf,加入 ``` [global] index-url = https://mirrors.aliyun.com/pypi/simple/ [install] trusted-host=mirrors.aliyun.com ``` 设置pyenv加速,比如安装Python 3.7.9 从阿里云下载Python `wget https://npm.taobao.org/mirrors/python/3.7.9/Python-3.7.9.tar.xz -P ~/.pyenv/cache` 再次安装,可以看到命令行窗口打印内容更改为Installing,解决下载速度慢的问题。 `pyenv install 3.7.9`