Anaconda Master in a Few Steps

Anaconda is a tool that every AI Engineer, Data Scientist, Data Analyst or Data Architect should try sometime in their life.

What is Anaconda?

Anaconda is an open-source software made up of packages and applications that help with data science and data analysis programming, although it can be used in a broad range of industries.

Why Anaconda?

When a large project is being developed, is necessary to have control of the packages that have been installed because dependencies may appear that can spoil the whole project. To help solve these possible problems, anaconda is our friend with its environment management and packages installer.

Firstly, Anaconda allows you to install packages from its own packages installer, by the way, you can combine it with PIP installing packages from Python Package Index (PyPI). However, anaconda allows you to install packages written in C, R, Java and even build packages from source code (in the lasts PIP version this feature is incorporated although it is easier to get bugs because is for academic purpose)

Secondly, you will see later, it permits the creation of isolated environments with the packages and versions that are necessary, making a copy of the binary files in the Anaconda directory. In order to be able to carry out a similar control without Anaconda, it would be necessary to install "virtualenv" and its plugin "pyenv-virtualenvwrapper" however it is not possible to choose the packages that are wanted in the environment in advance.

Be an Anaconda Shaolin Monk easily! 

Managing Environments

conda create --name test_env python=3.8

This command generates a virtual Anaconda environment in the "envs" directory with the name written for the --name parameter and the python version. In this case test_env and python 3.8.

conda activate test_env (windows)

 Activate the environment that has been created so that packages can be installed without affecting the others.

conda deactivate

Allows you to deactivate the environment that you were using

conda create --clone test_env --name test_env_cloned

If the environment you have used is working well (for example in production), it is recommended to copy the environment and work on it so as not to affect the main environment.

conda env remove --name test_env

It allows you to delete environments that are no longer used in order to have a cleaner and better management of environments.

However, the environments created with the previous commands generate empty or default environments. For this reason, with that command you can create an environment and at the same time add the packages that need to be used in the project:

conda create --name test_env scikit-learn

Managing Packages

If you have created an environment and you wish to install a package, it can be installed in two different ways:

Conda:

conda install jupyter

PyPI:

pip install jupyter

Anaconda GUI

In addition, for people who do not like using the terminal, all commands can be executed using the Anaconda graphic interface.

Anaconda GUI

Anaconda has many more commands to manage environments, packages end even Python version control. However, these are not the indispensable commands to know the power of Anaconda. In addition, Anaconda has a suite of applications so Anaconda (not mini-Anaconda) has different tools for programming in a more comfortable and fast way, however, this is going to be seen in future posts

Anaconda softwares

In conclusion, anaconda is the perfect free software to carry out projects that offer higher quality and faster results due to its easy management of virtual environments and packages. I like to call it the Swiss Army Knife of the Data Scientist.

 

References

https://www.anaconda.com/

 

 


Your subscription could not be saved. Please try again.
Your subscription has been successful. Thank you for joining this great data world.

GET OUR NEWSLETTER

You'll get the latest posts delivered to your inbox.