pip安装python包(国内源安装、离线包下载、离线源码安装、离线whl安装)

我就是我 2022-03-21 04:30 1432阅读 0赞

pip国内源安装python包

一、联网情况下

python安装某些包时,经常下载速度慢,或者出错。
解决办法:使用pip国内源

  1. #这里我们用豆瓣源: https://pypi.tuna.tsinghua.edu.cn/simple/
  2. #可以在使用pip的时候加参数 -i https://pypi.tuna.tsinghua.edu.cn/simple/
  3. pip install django -i https://pypi.tuna.tsinghua.edu.cn/simple/

如果要永久使用可以在’ C:\Users\某某某\pip路径下,创建’ pip.ini文件

  1. [global]
  2. index-url = https://pypi.tuna.tsinghua.edu.cn/simple/

二、离线情况下

1、先去pipy上下载离线包
2、(1)python setup.py
(2)安装whl包,pip install xxx.whl
3、安装某包出错

发表评论

表情:
评论列表 (有 0 条评论,1432人围观)

还没有评论,来说两句吧...

相关阅读