What is “Conda” and how it works: main commands

ARTIFICIAL INTELLIGENCE, PYTHON

Conda is an open-source package manager that runs on Windows, macOS, and Linux; it allows you to quickly install, run, and update packages and their dependencies, as well as create, save, load, and easily switch between environments on your computer. It was created for Python, but it can be used for any language.

Thanks to Conda, if you need to install a package that requires a different version of Python, you won’t need to install a new interpreter, as Conda is also an environment manager. With just a few commands, you can set up a completely separate environment to run a different version of Python, while continuing to use your regular Python version in your base environment.

In its default configuration, Conda can install and manage countless packages from repo.anaconda.com, built, reviewed, and managed by Anaconda.

Note: Conda is included in all versions of Anaconda and Miniconda.

Anaconda, on the other hand, is an environment created for Data Science. Anaconda simplifies the process of setting up a Python development environment because it includes everything you need to start coding. Conda includes about 300 ready-to-use packages for Data Science, such as Pandas, NLTK, Numpy, Matplotlib, Jupyter, Requests, TensorFlow, and others.

Let’s look at some useful commands:

To see available environments

conda env list

to activate an environment

conda activate <env_name>

to deactivate an environment

conda deactivate

to see all installed packages

conda list

to create an environment

conda create --name <name_env>

To search for available Python versions

conda search python

To change the Python version

for example:

conda install python=3.5.0

or:

conda install python=2.7.8

to install a package

conda install <package-name>

for example, to install TensorFlow 2.0

conda install tensorflow==2.0.0

to remove an environment, simply run the command

conda remove -n <env_name> --all

to clone an environment

conda create --name <env_name>  --clone <old_env_name> 
Se vuoi farmi qualche richiesta o contattarmi per un aiuto riempi il seguente form

    Comments