将Ubuntu存储库添加到Conda频道

问题描述 投票:-1回答:1

我有两个问题:

  1. 如何将Ubuntu存储库添加为Conda通道,以便我可以像sudo apt install <package>一样安装软件包?
  2. 这是接近康达的一种错误方式吗?

我是Conda的新手,我正在尝试了解围绕Conda环境和频道的一些最佳实践。我没有确切的用例,这只是为了我的好奇心而且我认识到以这种方式安装软件包(即从Ubuntu存储库中)可能是愚蠢或不必要的。


举个例子,我尝试在Conda环境中安装ispell

$ conda install --channel http://archive.ubuntu.com/ubuntu/dists/xenial/universe/ ispell
Collecting package metadata: failed

UnavailableInvalidChannel: The channel is not accessible or is invalid.
  channel name: ubuntu/dists/xenial/universe
  channel url: http://archive.ubuntu.com/ubuntu/dists/xenial/universe
  error code: 404

You will need to adjust your conda configuration to proceed.
Use `conda config --show channels` to view your configuration's current state,
and use `conda config --show-sources` to view config file locations.

由于http://archive.ubuntu.com/ubuntu/dists/xenial/universe可以在浏览器中访问,我不明白为什么返回错误代码404。我想这应该有一个简单的解决方案,我只是提供了一个错误的频道链接。

linux ubuntu conda
1个回答
2
投票

这是接近康达的一种错误方式。您无法将APT存储库添加为conda通道。 Conda通道需要一个名为repodata.json的文件,该文件不存在于APT存储库中,因此是404.您可以阅读有关在official documentation中创建conda通道的信息。

© www.soinside.com 2019 - 2024. All rights reserved.