dcss_supplementary icon indicating copy to clipboard operation
dcss_supplementary copied to clipboard

ResolvePackageNotFound when trying to set up the virtual environment

Open toast2023 opened this issue 1 year ago • 1 comments

I keep getting the following error message when trying to set up the virtual environment in chapter 1, using the conda env create -f environment.yml command:

Collecting package metadata (repodata.json): done Solving environment: failed

ResolvePackageNotFound:

  • mkl=2021.2.0
  • graph-tool=2.43
  • gensim=3.8.3

How can I fix it? I've already tried to install these packages manually and I've also tried to use mamba instead of conda. (my device specifics are: Apple M1 Pro; macOS Monterey)

toast2023 avatar Mar 09 '23 23:03 toast2023

Hi there, sorry for the quite late response, but if you (or anyone else) still have this issue, it is because the Apple M1 chip was released after DCSS was written. These use the ARM CPU architecture, sometimes listed as osx-arm64. You will need to install newer versions of some packages. I would suggest using the oldest version that supports osx-arm64, to minimize issues with API changes.

The oldest version of graph-tool you can use is 2.45. There shouldn't be many API changes between that and version 2.43 used in the notebooks.

mkl (intel math kernel library) is for intel processors only - you'll need to remove that line from your environment.yml. I believe the only impact, if any, will be longer runtimes in a small number of situations. If other problems come up, look to the nomkl package, maybe start here: https://stackoverflow.com/questions/71306262/conda-env-broken-after-installing-pytorch-on-m1-intel-mkl-fatal-error

Unfortunately, I believe you will have a lot of trouble with gensim, which was not updated for osx-arm64 until after 4.0 - a major release. The COMPASS section of Chapter 31, using TWEC, requires gensim version 3.8.3 and will not be feasible on your device. TWEC is unlikely to see any updates. The other chapters that use gensim should be possible, but the major release probably has a lot of API changes. You'll need version 4.2.0 or newer.

tcrick avatar Aug 31 '23 05:08 tcrick