Home > OS >  PackageNotFoundError even though required channel added to anaconda config?
PackageNotFoundError even though required channel added to anaconda config?

Time:12-14

I am working with Ubuntu in WSL and tried to install the required packages for a repo with:

$ conda install --file requirements.txt

I got a PackageNotFoundError for a bunch of different packages. I search on anaconda.org for the required channels and added them. But it doesn't matter which channels I add I always get a PackageNotFoundError for the last two remaining packages:

$ conda install --file requirements.txt
Collecting package metadata (current_repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Collecting package metadata (repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.

PackagesNotFoundError: The following packages are not available from current channels:

  - openssl==1.1.1=h7b6447c_0
  - intel-openmp==2019.5=281

Current channels:

  - https://conda.anaconda.org/fastchan/linux-64
  - https://conda.anaconda.org/fastchan/noarch
  - https://conda.anaconda.org/cctbx202208/linux-64
  - https://conda.anaconda.org/cctbx202208/noarch
  - https://conda.anaconda.org/pytorch/linux-64
  - https://conda.anaconda.org/pytorch/noarch
  - https://conda.anaconda.org/conda-forge/linux-64
  - https://conda.anaconda.org/conda-forge/noarch
  - https://repo.anaconda.com/pkgs/main/linux-64
  - https://repo.anaconda.com/pkgs/main/noarch
  - https://repo.anaconda.com/pkgs/r/linux-64
  - https://repo.anaconda.com/pkgs/r/noarch

To search for alternate channels that may provide the conda package you're
looking for, navigate to

    https://anaconda.org

and use the search bar at the top of the page.

Anaconda.org says conda-forge, fastchan, cctbx202208 for openssl but even though I added all of them it's still not found.

The next thing I tried was to install it with pip:

$ pip install openssl==1.1.1
ERROR: Could not find a version that satisfies the requirement openssl==1.1.1 (from versions: none)
ERROR: No matching distribution found for openssl==1.1.1

But pip detects none versions of this package. Same with intel-openmp, but pip does find packages but not the one I want 2019.5:

$ pip install intel-openmp==2019.5
ERROR: Could not find a version that satisfies the requirement intel-openmp==2019.5 (from versions: 2018.0.0, 2018.0.3, 2019.0, 2020.0.133, 2021.1.1, 2021.1.2, 2021.2.0, 2021.3.0, 2021.4.0, 2022.0.1, 2022.0.2, 2022.1.0, 2022.2.0, 2022.2.1)
ERROR: No matching distribution found for intel-openmp==2019.5

So my question is, is there another way to install the two packages or do they not exists anymore? Because the repo from which I got the code has its last commit from 3 years ago...

Edit:

I tried this command:

conda install -c anaconda openssl

and it installs openssl, but the latest version and than the code still says openssl is missing.

I also tried:

conda install -c anaconda openssl=1.1.1

but I get the same error as in the beginning (PackageNotFoundError in the channels).

Edit2:

TrackNPred is the repo I cloned and want to get working.

As for the required channel, I just searched for the package name on anaconda.org and add the channels i see to my anaconda config with:

conda config --add channels new_channel

I'm not sure if I need the exact version of a package as it's listed in the requirements.txt or if the code also works with another version of the two missing packages.

Edit3:

I changed in the requirements.txt:

openssl=1.1.1*
intel-openmp=2019.5

and that worked.

CodePudding user response:

If you don't require exact package build replication, then edit the file to loosen up the specifications.

I see the intel channel has intel-openmp=2019.5=intel_218 and any openssl=1.1.1 should do. So, find the respective entries in the requirements.txt file and edit them to have:

openssl=1.1.1*
intel-openmp=2019.5

then recreate the environment, with intel channel added.

conda config --set channel_priority flexible
conda create -n foo -c defaults -c intel --file requirements.txt
  • Related