使用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

在最后添加镜像

相关推荐
猫头虎1 天前
如何解决 OpenClaw “Pairing required” 报错:两种官方解决方案详解
网络·windows·网络协议·macos·智能路由器·pip·scipy
寻梦csdn2 天前
pycharm+miniconda兼容问题
ide·python·pycharm·conda
hampeter3 天前
【填坑指南】Trae/VS Code 远程连接 Ubuntu,终端总是自动激活特定的 Conda 环境?三招教你彻底解决!
linux·ubuntu·conda·trae
403240733 天前
【Jetson开发避坑】虚拟环境(Conda/Venv)调用系统底层OpenCV与TensorRT的终极指南
人工智能·opencv·conda
淮北4943 天前
pip虚拟环境包的问题
开发语言·python·pip
Albert Edison3 天前
【Python】函数
java·linux·python·pip
不懒不懒4 天前
【机器学习:下采样 VS 过采样——逻辑回归在信用卡欺诈检测中的实践】
python·numpy·scikit-learn·matplotlib·pip·futurewarning
qinyia4 天前
如何彻底卸载macOS上的conda并清理环境变量配置
macos·conda
weixin_421585014 天前
Mamba与Conda
conda
qq_273900235 天前
Apptainer 将 Ubuntu 本地 Conda 环境打包为 Singularity(SIF)镜像
linux·ubuntu·conda