I have two questions:
How can I add an Ubuntu repository as a Conda channel so I can install packages as I might with
sudo apt install <package>
?Is this an erroneous way of approaching Conda?
I'm new to Conda and I'm trying to understand some best practices surrounding Conda environments and channels. I don't exactly have a use case, this is just for my curiosity and I recognize that installing packages in this way (i.e. from an Ubuntu repository) may be foolish or unnecessary.
As an example, I've tried installing ispell
in a Conda environment:
$ 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.
Since http://archive.ubuntu.com/ubuntu/dists/xenial/universe is accessible in a browser, I don't understand why error code 404 is returned. I suppose this should have an easy solution and I'm just providing a wrong channel link.
This is an erroneous way of approaching conda. You cannot add an APT repository as a conda channel. Conda channels require a file called
repodata.json
that is not present in an APT repository, hence the 404. You can read about creating conda channels in the official documentation.