pip python第三方库安装相关问题

库安装:

pip install xxxxx

镜像源设置

pip默认安装第三方库速度较慢时,可以从国内的镜像源下载安装

设置方法

以清华镜像源为例:

临时使用

pip install -i https://pypi.tuna.tsinghua.edu.cn/simple xxxxxxx

永久设置

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

其他问题

有时候国内镜像源找不到最新版的包,可以在
https://www.lfd.uci.edu/~gohlke/pythonlibs/ 找到对应版本的whl文件进行本地安装(注意文件路径):pip install xxxxx.whl

posted @ 2021-06-04 18:35  ikventure  阅读(91)  评论(0编辑  收藏  举报