pip和conda添加和删除镜像源

conda不小心安装了一个同名的环境,不小心就把原来搞了两天的旧环境覆盖了,气死了,这里记录一下再来一遍的过程

conda create --name nerfstudio -y python=3.8

python -m ensurepip --default-pip

conda remove --name env_name --all

D:\miniconda\envs\nerfstudio\python.exe -m pip install pip==23.1.2

python.exe -m pip install --upgrade pip==23.0.1

【WARNING:Ignore distutils configs in setup.cfg due to encoding errors】完美解决

【WARNING:Ignore distutils configs in setup.cfg due to encoding errors】完美解决_warning: ignore distutils configs in setup.cfg due-CSDN博客

pip和conda添加和删除镜像源

一、pip

1、添加源

比如添加清华源https://pypi.tuna.tsinghua.edu.cn/simple:

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 config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple

or

pip config set global.index-url http://pypi.mirrors.ustc.edu.cn/simple/

如果set多次,似乎只能保存最后一次set的镜像源。

2、删除源

pip config unset global.index-url

3、查看现在用的哪个源

pip config list

二、conda

1、添加源

比如清华源:

conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/

conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/

conda config --set show_channel_urls yes

2、删除源

conda config --remove-key channels

3、查看现在用的是哪些源

conda config --show channels

也可以使用

conda config --show-sources

相关推荐
甜到心里的蛋糕3 分钟前
AI 生成 MV 音频异响排查:频谱定位、片段替换与 Nginx 缓存
人工智能·python·nginx·ffmpeg·音视频·音频处理
2601_9679801113 分钟前
python中的静态方法和类方法
python·静态方法·类方法·实例化·方法调用
智购科技无人售货机厂家20 分钟前
自动售货机物联网平台为什么会出现在线状态不一致?~YH
python·单片机·嵌入式硬件·django·pygame
飞Link8 小时前
什么是 AirSim?一文读懂无人机仿真平台
python·算法·无人机
曲径海盗9 小时前
【Python 学习第 38 天】for 循环
python·学习笔记·编程入门
在世修行9 小时前
智学文枢:变式题生成引擎
python·ai·pyside·题目生成
On The Road :11 小时前
Java 多线程详解:从入门到线程安全
java·python·安全
岁月宁静11 小时前
如何设计支持 Skills 的 Agent?一套可扩展的四层架构
python·agent
岁月宁静12 小时前
CrewAI 快速上手:10 分钟搭建你的第一个 Agent 团队
python·agent
曲径海盗12 小时前
【Python 学习第 40 天】for 循环
python·学习笔记·编程入门