使用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 天前
从0开始配置conda环境并在PyCharm中使用
ide·pycharm·conda
万粉变现经纪人4 天前
何解决PyCharm中pip install安装Python报错ModuleNotFoundError: No module named ‘json’问题
python·pycharm·json·beautifulsoup·scikit-learn·matplotlib·pip
知忆_IS4 天前
【问题解决】从Anaconda环境迁移到miniforge并在IDEA中完成环境配置
python·conda·intellij-idea·miniforge
小喵要摸鱼5 天前
pip 和 conda,到底用哪个安装?
conda·pip
未名编程6 天前
【已解决】报错:WARNING: pip is configured with locations that require TLS/SSL
网络协议·ssl·pip
Yc98018 天前
解决:开启魔法后vscode pip命令不能安装中科大python镜像问题
vscode·python·pip
万粉变现经纪人9 天前
如何解决pip安装报错ModuleNotFoundError: No module named ‘transformers’问题
人工智能·python·beautifulsoup·pandas·scikit-learn·pip·ipython
我是李武涯9 天前
conda pip uv与pixi
conda·pip·uv
沉醉不知处10 天前
conda创建环境失败
conda
ghostwritten11 天前
在 macOS 上 安装最新 Python 和 pip
python·macos·pip