gentzkow / template_archive

19 stars 36 forks source link

Revise channel priority setting when building conda #99

Closed ShiqiYang2022 closed 6 months ago

ShiqiYang2022 commented 6 months ago

Per https://github.com/gentzkow/template/issues/62#issuecomment-1306413158, we decided to set up the strict channel priority in conda to reduce the build time of environment. However, setting channel priority strict at the same time limit the search of packages in a certain channel. For example, attached is an error I encountered in SearchMarket project.

```zsh SIEPR-C02G50GUML86:SearchMarket shiqiyang$ conda env create -f setup/conda_env.yaml Channels: - conda-forge - r - defaults Platform: osx-64 Collecting package metadata (repodata.json): done Solving environment: / warning libmamba Problem type not implemented SOLVER_RULE_STRICT_REPO_PRIORITY warning libmamba Problem type not implemented SOLVER_RULE_STRICT_REPO_PRIORITY warning libmamba Problem type not implemented SOLVER_RULE_STRICT_REPO_PRIORITY warning libmamba Problem type not implemented SOLVER_RULE_STRICT_REPO_PRIORITY warning libmamba Problem type not implemented SOLVER_RULE_STRICT_REPO_PRIORITY warning libmamba Problem type not implemented SOLVER_RULE_STRICT_REPO_PRIORITY warning libmamba Problem type not implemented SOLVER_RULE_STRICT_REPO_PRIORITY warning libmamba Problem type not implemented SOLVER_RULE_STRICT_REPO_PRIORITY warning libmamba Problem type not implemented SOLVER_RULE_STRICT_REPO_PRIORITY warning libmamba Problem type not implemented SOLVER_RULE_STRICT_REPO_PRIORITY failed Channels: - conda-forge - r - defaults Platform: osx-64 Collecting package metadata (repodata.json): done Solving environment: / warning libmamba Problem type not implemented SOLVER_RULE_STRICT_REPO_PRIORITY warning libmamba Problem type not implemented SOLVER_RULE_STRICT_REPO_PRIORITY warning libmamba Problem type not implemented SOLVER_RULE_STRICT_REPO_PRIORITY warning libmamba Problem type not implemented SOLVER_RULE_STRICT_REPO_PRIORITY warning libmamba Problem type not implemented SOLVER_RULE_STRICT_REPO_PRIORITY warning libmamba Problem type not implemented SOLVER_RULE_STRICT_REPO_PRIORITY warning libmamba Problem type not implemented SOLVER_RULE_STRICT_REPO_PRIORITY warning libmamba Problem type not implemented SOLVER_RULE_STRICT_REPO_PRIORITY warning libmamba Problem type not implemented SOLVER_RULE_STRICT_REPO_PRIORITY failed LibMambaUnsatisfiableError: Encountered problems while solving: - package r-amr-2.1.1-r43h6115d3f_0 requires r-base >=4.3,<4.4.0a0, but none of the providers can be installed Could not solve for environment specs The following packages are incompatible ├─ r-amr is installable and it requires │ └─ r-base >=4.3,<4.4.0a0 with the potential options │ ├─ r-base [4.3.0|4.3.1] would require │ │ └─ icu >=72.1,<73.0a0 , which can be installed; │ └─ r-base [4.3.1|4.3.2|4.3.3] would require │ └─ icu >=73.2,<74.0a0 , which conflicts with any installable versions previously reported; └─ r-unicode is not installable because there are no viable options ├─ r-unicode 14.0.0_1 would require │ └─ r-base >=4.2,<4.3.0a0 but there are no viable options │ ├─ r-base [4.2.0|4.2.1|4.2.2|4.2.3] would require │ │ └─ icu >=70.1,<71.0a0 , which conflicts with any installable versions previously reported; │ ├─ r-base 4.2.3 would require │ │ └─ icu >=73.2,<74.0a0 , which conflicts with any installable versions previously reported; │ └─ r-base 4.2.3 would require │ └─ icu >=72.1,<73.0a0 , which can be installed; ├─ r-unicode 12.0.0_1 would require │ └─ r-base >=3.6,<3.7.0a0 but there are no viable options │ ├─ r-base 3.6.1 would require │ │ └─ clang_osx-64 4.* but there are no viable options │ │ ├─ clang_osx-64 4.0.1 would require │ │ │ └─ clang 4.0.1.* but there are no viable options │ │ │ ├─ clang 4.0.1 would require │ │ │ │ └─ compiler-rt 4.0.1 hcfea43d_1, which conflicts with any installable versions previously reported; │ │ │ ├─ clang 4.0.1 would require │ │ │ │ └─ libcxx 4.0.1 h579ed51_0, which conflicts with any installable versions previously reported; │ │ │ └─ clang 4.0.1 conflicts with any installable versions previously reported; │ │ └─ clang_osx-64 4.0.1 conflicts with any installable versions previously reported; │ ├─ r-base [3.6.1|3.6.2|3.6.3] would require │ │ └─ icu >=64.2,<65.0a0 , which conflicts with any installable versions previously reported; │ ├─ r-base 3.6.3 would require │ │ └─ icu >=68.1,<69.0a0 , which conflicts with any installable versions previously reported; │ ├─ r-base 3.6.3 would require │ │ └─ icu >=67.1,<68.0a0 , which conflicts with any installable versions previously reported; │ └─ r-base [3.6.0|3.6.1] conflicts with any installable versions previously reported; └─ r-unicode [12.0.0_1|14.0.0_1|15.0.0_1] conflicts with any installable versions previously reported. ```

The error got resolved when I revert the channel strict priority setting back to flexible. We need to revise our README.md file to recommend user to set channel_priority strict, instead of asking them to set strict channel priority by default.

ShiqiYang2022 commented 6 months ago

Threads continues in its PR #100.