我有两个问题:
sudo apt install <package>
一样安装软件包?我是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。我想这应该有一个简单的解决方案,我只是提供了一个错误的频道链接。
这是接近康达的一种错误方式。您无法将APT存储库添加为conda通道。 Conda通道需要一个名为repodata.json
的文件,该文件不存在于APT存储库中,因此是404.您可以阅读有关在official documentation中创建conda通道的信息。