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

相关推荐
易辰君4 分钟前
python爬虫 - 深入requests模块
开发语言·爬虫·python
人工智障调包侠4 分钟前
基于深度学习多层感知机进行手机价格预测
人工智能·python·深度学习·机器学习·数据分析
计算机编程-吉哥38 分钟前
计算机毕业设计 基于Python的智能文献管理系统的设计与实现 Python+Django+Vue 前后端分离 附源码 讲解 文档
python·django·毕业设计·计算机毕业论文·计算机毕业设计选题·软件工程毕业设计论文·文献管理系统
笃励1 小时前
Java面试题二
java·开发语言·python
一颗星星辰2 小时前
Python | 第九章 | 排序和查找
服务器·网络·python
打码人的日常分享2 小时前
企业人力资源管理,人事档案管理,绩效考核,五险一金,招聘培训,薪酬管理一体化管理系统(源码)
java·数据库·python·需求分析·规格说明书
27669582922 小时前
京东e卡滑块 分析
java·javascript·python·node.js·go·滑块·京东
unix2linux2 小时前
Parade Series - SHA256
linux·python·mysql·shell
巽星石2 小时前
【Blender Python】7.一些运算、三角函数以及随机
python·blender·三角函数·随机·环形阵列
CSXB992 小时前
一、Python(介绍、环境搭建)
开发语言·python·测试工具·集成测试