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

相关推荐
ZZHow10247 分钟前
PyTorch深度学习入门笔记(小土堆)P7-14
人工智能·pytorch·笔记·python·深度学习
很楠爱上1 小时前
AI项目------赛博负熵:拆解一个 Codex 生成的英语背单词全栈工程(附源码文件免费)
人工智能·python·codex
小挪号底迪滴1 小时前
Docker 多阶段构建实战:让 Python 镜像更小、更快、更安全
python·安全·docker
WangChenGe1 小时前
Windows 10/11 上 Pyenv-win 完整安装教程
python
想会飞的蒲公英1 小时前
PyTorch中SGD 与 Momentum 从零理解:给最朴素的优化器加上“惯性“
人工智能·pytorch·python·深度学习·机器学习
拿铁铁1 小时前
平板坡口机换碳刷时间参考手册
python·电脑
略略略咯咯1 小时前
stream流浅拷贝
开发语言·python
vx-程序开发1 小时前
【java项目分享】springboot农产品销售平台14952
java·javascript·spring boot·python·eclipse·django·php
Wesleyblue2 小时前
python计算余弦相似性和汉明距离
python·余弦相似性·汉明距离·二进制编码·数值向量
Patrick在香港2 小时前
Python依赖管理从踩坑到选型:pip/poetry/uv四种方案全面实测
开发语言·python·数据分析·scikit-learn·ai编程·pip·uv