Python配置Pip国内源

2023-05-16

临时指定下载源

以阿里云的镜像为例

pip install --trusted-host https://mirrors.aliyun.com -i https://mirrors.aliyun.com/pypi/simple/ <some-package>

设为默认,永久生效

Linux平台

Linux平台Pip配置文件为用户根目录下的:~/.pip/pip.conf,这里以阿里云镜像为例,添加如下内容

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

Windows平台

Windows平台Pip的配置文件路径为:C:\Users<UserName>\pip\pip.ini

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

下面是国内其他境像源

中科大:https://pypi.mirrors.ustc.edu.cn/
清华:https://pypi.tuna.tsinghua.edu.cn/simple
华为云:https://repo.huaweicloud.com/repository/pypi/simple
中国科技大学 https://pypi.mirrors.ustc.edu.cn/simple/
华中理工大学:https://pypi.hustunique.com/
山东理工大学:https://pypi.sdutlinux.org/
豆瓣:https://pypi.douban.com/simple/

要切换为其他镜像源,配置方法是将上面例子的域名做对应修改即可

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

Python配置Pip国内源 的相关文章

随机推荐

  • matlab中ln、lg函数怎么表示

    我们首先需要知道在matlab中Ln x 表示成了log x xff0c lg x 表示成log10 x xff0c 如下图所示 xff1a 我们可以在matlab命令行窗口中输入 help log xff0c 可以看到关于log函数的介绍
  • MATLAB 中 if 语句中如何表示并列条件

    matlab中的条件 amp amp 表示 and 表示 or至于一个 amp 和 是逻辑操作运算 别搞混了 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61
  • tensorflow中使用Adam出现name ‘Adam‘ is not defined【转】

    转自Colab中使用Adam出现name Adam is not defined 错误场景 在本地运行正常 xff0c 之前在tensorflow上运行也正常 xff1b 之后重新运行colab上的代码 xff0c 出现如下错误 xff1a
  • Linux 安装 miniconda

    1 安装miniconda 1 百度输入miniconda 找到miniconda 如下图第一个链接 2 找到linux版本的miniconda 此处我要安装Python3 7版本的Linux下的miniconda 3 复制下载链接 如下
  • Linux将一个文件夹或文件夹下的所有内容复制或移动到另一个文件夹

    1 将一个文件夹下的所有内容复制到另一个文件夹下 cp r home packageA home cp packageB 或 cp r home packageA home cp packageB 这两种方法效果是一样的 方法示例 xff1
  • 算法网址

    九章算法 xff1a https www jiuzhang com Lintcode xff1a https www lintcode com Leetcode xff1a https leetcode com CodeTop xff1a
  • Datawhale跟李沐大神合作举办 (动手学深度学习) !

    三月的组队学习跟李沐大神合作举办 动手学深度学习 xff0c 欢迎感兴趣的小伙伴报名学习 xff0c 另外 xff0c 欢迎志同道合的小伙伴了解 加入Datawhale 跟李沐导师 xff1a 动手学深度学习 xff01 动手学深度学习 P
  • 期刊会议名缩写查询-1

    投往IEEE transactions的论文 xff0c 其中的参考文献格式都是采用会议期刊的缩写 本博客特此记录如何查询期刊和会议名的缩写问题 期刊名缩写 SCI论文的参考文献很多期刊名都是缩写 xff0c 如下图所示 在写论文时 xff
  • Linux从用户层到内核层系列 - GNU系列之你所不知道的printf

    题记 xff1a 本系列文章的目的是抛开书本从源代码和使用的角度分析Linux内核和相关源代码 xff0c byhankswang和你一起玩转linux开发 轻松搞定TCP IP协议栈 xff0c 原创文章欢迎交流 byhankswang
  • 第十一届蓝桥杯python组第二场省赛-排序

    1 问题描述 xff1a 小蓝最近学习了一些排序算法 xff0c 其中冒泡排序让他印象深刻 在冒泡排序中 xff0c 每次只能交换相邻的两个元素 小蓝发现 xff0c 如果对一个字符串中的字符排序 xff0c 只允许交换相邻的两个字符 xf
  • 4306 序列处理(贪心)

    1 问题描述 xff1a 给定一个长度为 n 的整数序列 a1 xff0c a2 xff0c xff0c an 我们可以对该序列进行修改操作 xff0c 每次操作选中其中一个元素 xff0c 并使其增加 1 现在 xff0c 请你计算要使得
  • python数据分析基础-datafrom基础属性

    linux 43 pycharm 43 anaconda span class token keyword import span pandas span class token keyword as span pd data1 span
  • python数据分析基础-series基本统计运算,数据运算和比较运算

    linux 43 pycharm 43 anaconda 96 span class token comment 两个series数据运算 43 span num span class token operator 61 span pd s
  • python数据分析-柱状图绘制及常用参数设置

    linux 43 pycharm 43 anaconda span class token comment 柱形图绘制与参数设置 span span class token comment plt bar x height width bo
  • 爬取西窗烛app

    本文旨在学习 xff0c 不可做商业用途 span class token keyword import span csv span class token keyword import span json span class token
  • 爬取百度地图店家信息

    本文旨在交流学习 xff0c 勿作他用 xff0c 否则后果自负 span class token keyword import span json span class token keyword import span csv span
  • 爬取蝉妈妈数据平台商品数据

    本文旨在交流学习 xff0c 勿作他用 xff0c 否则后果自负 环境 linux 43 pycharm 43 anaconda span class token keyword import span json span class to
  • selenium+webdriver+chrome实现百度以图搜图

    1 环境搭建 1 webdriver 43 chrome的版本需匹配 2 打开chrome 输入 chrome version 来查看chrome版本 访问此网站 谷歌浏览器驱动 然后选择合适版本webdriver 2 收集原始图片和构建图
  • 无聊之重学c/c++

    span class token macro property span class token directive hash span span class token directive keyword include span spa
  • Python配置Pip国内源

    临时指定下载源 以阿里云的镜像为例 pip install trusted host https mirrors aliyun com i https mirrors aliyun com pypi simple lt some packa