Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the purpose of the c flag in the "conda install" command

I'm learning to setup python environments using conda, and I noticed that on the anaconda cloud website they recommend installing packages using the sintax

conda install -c package 

However on the conda documentation they use the same command without the c flag.

Could anyone explain to me what is the purpose of the c flag and when should it be used?

like image 830
Alessandro Messori Avatar asked Feb 23 '19 20:02

Alessandro Messori


People also ask

What is conda install C command?

Installs a list of packages into a specified conda environment. This command accepts a list of package specifications (e.g, bitarray=0.8) and installs a set of packages consistent with those specifications and compatible with the underlying environment.

What does conda command do?

The conda command is the primary interface for managing installations of various packages. It can: Query and search the Anaconda package index and current Anaconda installation. Create new conda environments.

What does conda install Anaconda do?

Conda is a package manager. It helps you take care of your different packages by handling installing, updating and removing them. Anaconda contains all of the most common packages (tools) a data scientist needs and can be considered the hardware store of data science tools.

What does conda install pip do?

pip is the standard package manager for python, meaning you can use it both inside and outside of Anaconda. It allows you to install and manage additional packages that are not part of the Python Package Index (PyPI).


1 Answers

-c stands for --channel. It's used to specify a channel where to search for your package, the channel is often named owner.

The generic command is: conda install -c CHANNEL_NAME PACKAGE_NAME

For example, let's say you want to download pytorch. You can search on anaconda.org. You'll see that pytorch (the pacakge) is owned by pytorch.

enter image description here

Then, you'll just have to do a:

conda install -c pytorch pytorch

like image 150
RobinFrcd Avatar answered Sep 27 '22 17:09

RobinFrcd