首页 > 其他分享 >pip 换源

pip 换源

时间:2023-02-14 11:25:42浏览次数:28  
标签:index simple global pypi url 换源 pip

临时换源命令

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

pip install markdown -i https://mirrors.aliyun.com/pypi/simple/

pip install markdown -i http://mirrors.cloud.tencent.com/pypi/simple

pip install markdown -i http://pypi.douban.com/simple/
永久换源命令:
pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple
pip config set global.index-url https://mirrors.aliyun.com/pypi/simple/
pip config set global.index-url http://mirrors.cloud.tencent.com/pypi/simple
pip config set global.index-url http://pypi.douban.com/simple/
换回默认源
pip config unset global.index-url
但是这里更推荐另外一种方式
%USERPROFILE%\AppData\Roaming\ 路径下创建一个pip文件夹,文件夹内创建pip.ini格式的文件,文件内容

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

USERPROFILE是windows自己定义的环境变量一般是C:\Users\XXXX\AppData\Roamin\
但是这个文件夹一般点不进去,直接复制路径然后进入就好

以上都是其他人的内容,只能算半个裁缝

标签:index,simple,global,pypi,url,换源,pip
From: https://www.cnblogs.com/so-shuai/p/17118966.html

相关文章

  • -bash: pip: command not found
    使用pip安装软件包时报错命令不存在[root@test~]#pip-V-bash:pip:commandnotfound 机器上没有安装pip,需要手动进行安装centos系统:#python3.7版本wgetht......
  • GitLab CICD Day 04 - 新增 Pipeline Job
    编写.gitlab-ci.ymlhelloworld:#Jobtags:-shell#Gitlab-runnerbefore_script:-echo"脚本执行前的任务"scrip......
  • 8.3 编译器负责转换源代码
    能够把C语言等高级编程语言编写的源代码转换成本地代码的程序称为编译器。每个编写源代码的编程语言都需要其专用的编译器将C语言编写的源代码转换成本地代码的编译器称......
  • 怎么使用 Scrapy 框架自带的 pipelines
    目录定义一个item启用默认的FilesPipeline配置一个下载路径(FILE_STORE)调用items主文件下载做法精细化操作定义一个item参数要设置为file_urls和files调用时fi......
  • 002GitLab集成Jenkins构建pipeline流水线任务
    CI持续集成(ContinuousIntegration),CD持续部署(ContinuousDeployment)Jenkins是一个优秀的持续集成和持续部署平台,有丰富的插件支持,可以满足各种个性化build场景。GitLab可......
  • ubunut 安装pip3
    转载至:【Ubuntu安装pip】sudoapt-getinstallpython3-pip报安装依赖包失败的解决办法 一、ubuntu安装pipsudoapt-getinstallpython3-pip二、依赖包不存在 ......
  • 多媒体框架 PipeWire 0.3.65 正式发布
    PipeWire项目发布了PipeWire0.3.65版本,这是用于处理音频和视频流的开源服务器以及GNU/ Linux 系统上的相关硬件设备的新稳定更新。PipeWire0.3.65添加了......
  • 软件测试|教你轻松解决pip安装下载超时问题
    前言pip是我们最常用的Python第三方库安装工具,不管是什么库,我们只需要一条pipinstall命令就能安装,但是现在经常出现一些安装超时的问题,这是为什么呢?因为pip默认是从Python......
  • Jenkins-declarative-pipeline
    声明式流水线示例:官方文档defremotepipeline{agentanystages{stage('RemoteServer'){steps{script......
  • Scrapy 框架的 pipelines 参数详解
    目录pipelines的使用一个例子pipelines常用的函数pipelines的使用在pipelines.py中创建pipelines的类。(也可用默认存在的类)classPipelinesTest:defp......