簡體   English   中英

將Ubuntu存儲庫添加到Conda頻道

[英]Add Ubuntu repository to Conda channel

我有兩個問題:

  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。 我想這應該有一個簡單的解決方案,而我只是提供了錯誤的頻道鏈接。

這是接近conda的錯誤方式。 您不能將APT存儲庫添加為conda通道。 Conda頻道需要一個名為repodata.json的文件,該文件在APT存儲庫中不存在,因此在404中不存在。您可以在官方文檔中閱讀有關創建conda頻道的信息

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM