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

在最后添加镜像

相关推荐
万粉变现经纪人18 小时前
如何解决 pip install -r requirements.txt 约束文件 constraints.txt 仅允许固定版本(未锁定报错)问题
开发语言·python·r语言·django·beautifulsoup·pandas·pip
万粉变现经纪人20 小时前
如何解决 pip install -r requirements.txt 无效可编辑项 ‘e .‘(-e 拼写错误)问题
开发语言·python·r语言·beautifulsoup·pandas·pip·scipy
Autumn72991 天前
【材料学python入门】conda、 jupyter、cpu、GPAW、wsl、ubuntu
python·jupyter·conda
感谢地心引力1 天前
【Python】基于 PyQt6 和 Conda 的 PyInstaller 打包工具
数据库·python·conda·pyqt·pyinstaller
月光下的麦克1 天前
win10安装conda环境
conda
害恶细君2 天前
【超详细】使用conda配置python的开发环境
开发语言·python·jupyter·pycharm·conda·ipython
一抹轻笑动人3 天前
Conda 常用命令速查表
conda
雨夜的星光3 天前
Python环境管理工具全景对比:Virtualenv, Pipenv, Poetry 与 Conda
python·pycharm·conda·virtualenv
猫头虎3 天前
如何解决 pip install -r requirements.txt 本地轮子路径 ‘./packages/xxx.whl’ 不存在 问题
开发语言·网络·python·r语言·pip·gpu算力·国产
小小毛毛虫~6 天前
使用Cursor遇到的问题(一):cursor使用conda虚拟环境
python·conda·cursor