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
相关推荐
luckdewei12 小时前
FastAPI 资产管理系统实战:复杂 ORM 关联、Alembic 迁移与 N+1 查询优化
python
aqi0018 小时前
15天学会AI应用开发(八)使用向量数据库实现RAG功能
人工智能·python·大模型·ai编程·ai应用
Csvn19 小时前
`functools.lru_cache` —— 一行代码搞定缓存加速
后端·python
金銀銅鐵1 天前
[Python] 从《千字文》中随机挑选汉字
后端·python
cup112 天前
[技术复盘] Windows Python 打包实战:Nuitka 环境踩坑总结与 CI 自动化构建全指南
python·ai·环境变量·ci·nuitka·skill
aqi002 天前
15天学会AI应用开发(七)有了大模型为什么还要引入RAG
人工智能·python·大模型·ai编程·ai应用
金銀銅鐵2 天前
用 Python 实现 Take-Away 游戏
python·游戏
copyer_xyf2 天前
Agent 流程编排
后端·python·agent