python linux 等 使用国内源安装软件 速度更快 你值得拥有 !

豆瓣源:pip install -i https://pypi.douban.com/simple/

阿里源:pip install -i http://mirrors.aliyun.com/pypi/simple/

清华源:pip install -i https://pypi.tuna.tsinghua.edu.cn/simple/

华中理工大学源 :pip install -i http://pypi.hustunique.com/simple/
山东理工大学 源 :pip install -i http://pypi.sdutlinux.org/simple/
中国科学技术大学源 :pip install -i http://pypi.mirrors.ustc.edu.cn/simple/

1、使用 pip 安装软件(包):指定源

pip install -i 源 软件(或者包)

例如:pip install -i https://pypi.douban.com/simple pymysql

2、一劳永逸的做法:

  •  linux下,在当前用户目录下

修改 ~/.pip/pip.conf (没有就创建一个),

修改 index-url至trusted-host,内容如下:

[global]
index-url = https://pypi.douban.com/simple/
[install]
trusted-host = mirrors.douban.com
  •  windows 下

在你的“C:\Users\你的用户名\”目录下创建“pip”目录,

“pip”目录下创建“pip.ini”文件(注意:以UTF-8 无BOM格式编码);
“pip.ini”文件内容:


[global]
index-url = https://pypi.douban.com/simple
[install]
trusted-host = mirrors.douban.com

注意:trusted-host 选项为了避免麻烦是必须的,否则使用的时候会提示不受信任,
或者添加“--trusted-host=mirrors.aliyun.com”选项; 注意:有网页提示需要创建或修改配置文件
(linux的文件在~/.pip/pip.conf,windows在%HOMEPATH%\pip\pip.ini),
至少Windows7下“%HOMEPATH%\pip\pip.ini”这个目录是不起作用的。
  • pycharm 指定第三方源

点击File ---> Setting ---> Project Interpeter,

点击右边的➕按钮弹出包管理界面 ,

选择下方的Manage Repositories按钮,

加入上面的镜像即可

源地址的后面可以有“/”,也可以没有“/”:

https://pypi.tuna.tsinghua.edu.cn/simple

https://pypi.tuna.tsinghua.edu.cn/simple/

python 使用国内源安装软件的更多相关文章

  1. debian9使用国内源安装docker以及一些使用方法

    debian9使用国内源安装docker以及一些使用方法   首先, 我的环境是debian, 容器是centos debian 扔源 # deb-src [arch=amd64] https://m ...

  2. ubuntu ARM换国内源和国内源安装ROS

    ubuntu arm换国内源: https://www.cnblogs.com/yongy1030/p/10315569.html 国内源安装ROS: https://blog.csdn.net/ch ...

  3. centos7 安装zabbix3.0 安装zabbix4.0 yum安装zabbix 国内源安装zabbix 阿里云服务器安装zabbix

    首先,此篇文章是有原因的. 刚开始也和大家一样来学习安装zabbix 奈何网上的教程和现实出现不一样的情况 在安装zabbix过程中,因为zabbix下载源是在国外,下载途中会出现终止下载的情况 tr ...

  4. Python更换国内源实现快速PIP安装

    WINDOWS 安装pip 1.首先下载安装Python,并将python的安装目录添加进系统环境变量 2.复制这个文件保存为.py并执行 https://bootstrap.pypa.io/get- ...

  5. python pip国内源

    pip国内的这个源最快   清华大学 https://pypi.tuna.tsinghua.edu.cn/simple/ 修改源方法: 临时使用: 可以在使用pip的时候在后面加上-i参数,指定pip ...

  6. ubuntu 16.04 国内源安装docker

    1. 通过curl命令安装 检查是否安装curl root@ros-OptiPlex-3050:~# which curlroot@ros-OptiPlex-3050:~# 更新安装 root@ros ...

  7. (原+修改)Pip使用国内源安装opencv

    转载请注明出处: https://www.cnblogs.com/darkknightzh/p/12000823.html 参考网址: https://www.imooc.com/article/34 ...

  8. debian10使用国内源安装docker以及一些使用方法

    首先, 我的环境是debian, 容器是centos debian 安装添加新存储库所需的依赖项 1 sudo apt install ca-certificates curl software-pr ...

  9. jenkins 2.204.2 安装, 使用国内源安装, 并且跳过插件界面, 更新成国内插件源.

    需要java环境支持,自行百度. jenkins 安装源在国外, 下载会比较慢, 尤其在linux下, 使用yum或者apt install jenkins方式安装时,经常会下载失败. 由于yum或者 ...

随机推荐

  1. 容器化RDS|计算存储分离 or 本地存储?

    随着交流机会的增多(集中在金融行业,规模都在各自领域数一数二),发现大家对 Docker + Kubernetes 的接受程度超乎想象, 并极有兴趣将这套架构应用到 RDS 领域.数据库服务的需求可以 ...

  2. bzoj1656: [Usaco2006 Jan] The Grove 树木 (bfs+新姿势)

      题目大意:一个n*m的图中,“.”可走,“X”不可走,“*”为起点,问从起点开始绕所有X一圈回到起点最少需要走多少步. 一开始看到这题,自己脑洞了下怎么写,应该是可过,然后跑去看了题解,又学会了一 ...

  3. SRM13 T3 花六游鸟小(结论题)

    哇这题是真的喵,HR智商太高辣 这题的难点就是看了题解之后怎么证明题解里的结论... 结论①:深度大于logm的点肯定能达到最大值 证明:显然一个西瓜的属性里0数量一半1数量一半我们取到的1数量最少, ...

  4. 关于我之前写的修改Windows系统Dos下显示的用户名之再修改测试

    最近看到蛮多网友反映,自己修改Dos下用户名后出现了很多的问题--今天抽了时间,再次修改测试... ================= 提前说明:我自己修改了很多次没发现任何问题,<为避免修改可 ...

  5. python---aiohttp的使用

    1.aiohttp的简单使用(配合asyncio模块) import asyncio,aiohttp async def fetch_async(url): print(url) async with ...

  6. CSS知识之 background-position 用法详细介绍

    一.语法 background-position : length || length background-position : position || position 二.取值 length   ...

  7. hihocoder1445 后缀自动机二·重复旋律5

    传送门:http://hihocoder.com/problemset/problem/1445 [题解] 大概看了一天的后缀自动机,总算懂了一些 这篇文章写的非常好,诚意安利:Suffix Auto ...

  8. shell 给未定义的变量设定默认值 ${parameter:-word}

    参考: [ Unix & Linux ] Shell Demo $echo ${JENKINS_VERSION:-2.7.4} 2.7.4 $JENKINS_VERSION=2.99 $ech ...

  9. TOJ 1049 Jesse's problem (最短路 floyd)

    描述 All one knows Jesse live in the city , but he must come to Xiasha twice in a week. The road is to ...

  10. list互转datatable 支持Nullable转换

    /// <summary> /// list转datatable /// </summary> /// <param name="list">& ...