使用yml文件安装环境时,如何添加conda和pip的镜像源

博客参考

添加conda镜像源

yaml 复制代码
name: NAME
channels:
  - conda-forge
  - pytorch
  - https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
  - https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/r
  - https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/msys2
  - defaults
dependencies:
  - _libgcc_mutex=0.1=conda_forge
  - _openmp_mutex=4.5=2_kmp_llvm
  - ...

保留conda-forge

添加pip镜像源

yaml 复制代码
	- pip:
      - absl-py==1.4.0
      - aiohttp==3.8.3
      - aiosignal==1.3.1
      - ...
      - -i https://pypi.tuna.tsinghua.edu.cn/simple

在最后添加镜像

相关推荐
tryCbest3 天前
Windows环境下配置pip镜像源
windows·pip
百锦再3 天前
Django实现接口token检测的实现方案
数据库·python·django·sqlite·flask·fastapi·pip
Nightmare0044 天前
切换conda环境的时候输出zstandard could not be imported. Running without .conda support.
开发语言·python·conda
墨染天姬4 天前
【AI】conda常用指令
人工智能·conda
SCBAiotAigc4 天前
2026.2.25:conda与uv并存时,如何取消base激活
人工智能·python·conda·uv
何伯特5 天前
ROS与Conda的兼容性问题深度解析与解决方案
conda·ros
coding者在努力5 天前
LangChain之解析器核心组件.2026年新版讲解,超详细
windows·python·机器学习·langchain·pip
wumingxiaoyao5 天前
从 requirements.txt 到 uv:多模块 Monorepo 的依赖管理升级指南(用法、特点、区别与最佳实践 + 例子)
pip·uv·pip tool
Autumn72996 天前
【系统重装】PYTHON 入门——速通版
开发语言·python·conda·cuda
C系语言6 天前
Anaconda、conda环境命令
conda