首页 > 解决方案 > 在 Conda environment.yaml 中设置 channel_priority

问题描述

使用yaml文件创建环境时是否可以设置为channel_prioritystrict例如:

name: my_environment
channels:
  - conda-forge
dependencies:
  - python
  - geopandas
  - rasterio

标签: pythoncondaenvironment

解决方案


感谢merv
一种解决方法是为每个包指定通道:

name: my_environment
channels:
  - conda-forge
dependencies:
  - conda-forge::python
  - conda-forge::geopandas
  - conda-forge::rasterio

推荐阅读