美文网首页
pip换国内源

pip换国内源

作者: Adam_0 | 来源:发表于2019-10-30 20:54 被阅读0次

pip国内的一些镜像

阿里云 http://mirrors.aliyun.com/pypi/simple/
中国科技大学 https://pypi.mirrors.ustc.edu.cn/simple/
豆瓣(douban) http://pypi.douban.com/simple/
清华大学 https://pypi.tuna.tsinghua.edu.cn/simple/
中国科学技术大学 http://pypi.mirrors.ustc.edu.cn/simple/

修改源方法:

临时使用:
可以在使用pip的时候在后面加上-i参数,指定pip源
eg: pip install scrapy -i https://pypi.tuna.tsinghua.edu.cn/simple

永久修改:
linux:
修改 ~/.pip/pip.conf (没有就创建一个), 内容如下:

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

windows:
直接在user目录中创建一个pip目录,如:C:\Users\xx\pip,在pip 目录下新建文件pip.ini,内容如下
或者按照网友的建议:win+R 打开用户目录%HOMEPATH%,在此目录下创建 pip 文件夹,在 pip 目录下创建 pip.ini 文件, 内容如下

[global]
timeout = 6000
index-url = https://pypi.tuna.tsinghua.edu.cn/simple
trusted-host = pypi.tuna.tsinghua.edu.cn

相关文章

  • pip换国内源

    pip国内的一些镜像 阿里云 http://mirrors.aliyun.com/pypi/simple/中国科技...

  • pip,anaconda 换国内源

    1. 为什么要换源 如果你的网络足够好,那就不要换了,个人认为国外源还是最好的,可惜人生不如意事十之八九,时不时出...

  • ubuntu pip 换国内源

    ubuntu默认pip源为国外源,速度较慢,以及有时有连接不上的情况。可以设置成国内的源以提高下载速度和稳定性。 ...

  • pip更换国内源

    Python pip更换国内源 国内源 常用的国内源 linux更换操作 创建这个文件并输入以下内容~/.pip/...

  • pip 安装包报错处理及更换国内源地址

    pip国内源地址: 更换国内源地址

  • python使用国内源

    1、常用国内源 2、临时使用国内源 3、全局使用国内源 命令运行完成后,pip.conf中内容为: 4、pip c...

  • Mac下conda换源、pip换源

    conda换国内源 在清华源和中科大源之间自行选择 添加中科大源 添加清华源 pip换源 在home目录下的隐藏文...

  • pip 国内源

  • pip国内源

    编辑pip配置文件vim ~/.pip/pip.conf 阿里源 中科大源 清华源 豆瓣源

  • pip国内源

    粘贴版

网友评论

      本文标题:pip换国内源

      本文链接:https://www.haomeiwen.com/subject/vwpavctx.html