linux 即使所需通道已添加到anaconda配置中,仍出现PackageNotFoundError?

pu82cl6c  于 2022-12-18  发布在  Linux
关注(0)|答案(1)|浏览(206)

我正在WSL中使用Ubuntu,并尝试安装repo所需的软件包:

$ conda install --file requirements.txt

我得到了一个PackageNotFoundError的一堆不同的软件包。我搜索anaconda.org所需的通道,并添加他们。但无论我添加哪些通道,我总是得到一个PackageNotFoundError的最后两个软件包:

$ 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 说openssl的conda-forge, fastchan, cctbx202208,但是即使我添加了所有的conda-forge, fastchan, cctbx202208,仍然没有找到。
我尝试的下一件事是用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

但是pip没有检测到这个软件包的任何版本。intel-openmp也是一样,但是pip确实找到了软件包,但是没有找到我想要的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

所以我的问题是,有没有别的方法来安装这两个包或者它们已经不存在了?因为我从其中获得代码的repo有它的最后一次提交是在3年前...

编辑

我试了这个命令:

conda install -c anaconda openssl

而且它安装了OpenSSL,但是最新的版本和比代码仍然说OpenSSL丢失了。
我也试过:

conda install -c anaconda openssl=1.1.1

但我得到了与开始时相同的错误(通道中的PackageNotFoundError)。

编辑2

TrackNPred是我克隆的存储库,希望它能够正常工作。
至于所需的频道,我只是在anaconda.org上搜索了包名称,并将我看到的频道添加到我的anaconda配置中:

conda config --add channels new_channel

我不确定我是否需要requirements.txt中列出的软件包的确切版本,或者代码是否也适用于两个缺失软件包的另一个版本。

编辑3

我在requirements.txt中进行了更改:

openssl=1.1.1*
intel-openmp=2019.5

而且奏效了。

kcrjzv8t

kcrjzv8t1#

如果您不需要 exact 软件包构建复制,则编辑该文件以放宽规范。
我看到intel通道有intel-openmp=2019.5=intel_218,任何openssl=1.1.1都应该有。因此,在requirements.txt文件中找到相应的条目并将其编辑为:

openssl=1.1.1*
intel-openmp=2019.5

然后重新创建环境,并添加intel频道。

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

相关问题