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 分钟前
基于YOLO26深度学习的骑行安全检测与语音提示系统【python源码+Pyqt5界面+数据集+训练代码】
人工智能·python·深度学习·骑行安全检测
xiaotao1314 分钟前
阶段零:Python 安装与虚拟环境(venv / Conda)
开发语言·人工智能·python·conda
黑剑客与剑7 分钟前
pycdc-studio v0.1.8,支持Pyarmor 解密
python·pycdc·pyarmor·pycdc-studio
岁岁的O泡奶9 分钟前
NSSCTF_reverse_[SWPUCTF 2022 新生赛]base64——[HDCTF 2023]easy_re
经验分享·python·逆向
wgzrmlrm7412 分钟前
Django怎么优雅发送邮件_Python配置SMTP后端实现异步通知
jvm·数据库·python
kcuwu.19 分钟前
Python 数据分析实战:NumPy、Pandas、Matplotlib 融合
python·数据分析·numpy
Thomas214319 分钟前
skill分享 iterm2 jupyter jumpserver
ide·python·jupyter
落羽的落羽23 分钟前
【算法札记】练习 | Week1
linux·服务器·c++·人工智能·python·算法·机器学习
踏着七彩祥云的小丑23 分钟前
Python——排序
开发语言·python
计算机徐师兄23 分钟前
Python基于深度学习的图片智能分类系统(附源码,文档说明)
python·深度学习·图片智能分类系统·python图片智能分类系统·汽车分类·汽车图片智能分类系统·python汽车智能分类系统