conda不同环境pip list包都一样问题;conda国内镜像加速

1、conda不同环境pip list包都一样问题

注意是因为conda创建不同环境里用pip安装容易导致,因为pip install安装 python包管理大多都默认到一个地方,正常用conda install就会有隔离

参考:https://blog.csdn.net/tywwwww/article/details/127247077

解决:

1) 每个conda新环境安装环境用conda install

2)一定要用pip安装,那需要每个conda新环境修改下 envs/envname/lib/site.py中的 USER_SITE和USER_BASE地址,修改成本conda环境地址路径;个人倾向这种,pip安装方便些相关加速也丰富

或者也可以直接pip 安装-t 指定安装目录

matlab 复制代码
pip install numpy -i https://mirror.baidu.com/pypi/simple --trusted-host mirror.baidu.com  -t C:\Users\loong\.conda\envs\paddle\Lib\site-packages

注意:差别conda环境安装的包,用conda list;如果用pip list还是会有问题会显示不是本环境的包

2、conda国内镜像加速

参考:https://blog.csdn.net/weixin_41194129/article/details/130979805

matlab 复制代码
##清华
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
matlab 复制代码
##中科大
conda config --add channels https://mirrors.ustc.edu.cn/anaconda/pkgs/main/
conda config --add channels https://mirrors.ustc.edu.cn/anaconda/pkgs/free/
conda config --set show_channel_urls yes
相关推荐
AI探索者17 小时前
LangGraph StateGraph 实战:状态机聊天机器人构建指南
python
AI探索者17 小时前
LangGraph 入门:构建带记忆功能的天气查询 Agent
python
FishCoderh18 小时前
Python自动化办公实战:批量重命名文件,告别手动操作
python
躺平大鹅18 小时前
Python函数入门详解(定义+调用+参数)
python
曲幽19 小时前
我用FastAPI接ollama大模型,差点被asyncio整崩溃(附对话窗口实战)
python·fastapi·web·async·httpx·asyncio·ollama
两万五千个小时1 天前
落地实现 Anthropic Multi-Agent Research System
人工智能·python·架构
哈里谢顿1 天前
Python 高并发服务限流终极方案:从原理到生产落地(2026 实战指南)
python
用户8356290780512 天前
无需 Office:Python 批量转换 PPT 为图片
后端·python
markfeng82 天前
Python+Django+H5+MySQL项目搭建
python·django
GinoWi2 天前
Chapter 2 - Python中的变量和简单的数据类型
python