Python Anaconda: 1) installation; 2) need for Machine Learning
Two questions about Python Anaconda
OS Ubuntu 16.04. Do I need to demolish the existing Python and libraries (pandas, numpy, mathplotlib, etc.) before installing PA? If not, will the libraries be updated to new versions? Are there any conflicts?
I started studying Machine Learning. Some citizens write that it is highly desirable to install a PA because there will be a Jupyter Notebook, all installed libraries and a number of other important amenities. The presence of the PA is valid will it greatly simplify life in this sense?
The questions are simple, so I will accept answers like yes\no.
1 answers
As colleagues have already commented, Anaconda is placed in a separate directory (you decide where) and does not overlap with the "system" Python.
If everything is done correctly, then no difficulties/problems will arise.
Here is an approximate algorithm for installing Anaconda under UNIX*:
Installing Anaconda:
bash Anaconda3-X.X.X-Linux-x86_64.sh
Update conda
:
conda update conda
Creating your own VirtualEnv (environment name - ml
[machine learning], Python version - 2.7):
conda create -n ml python=2.7 anaconda
PS you can create multiple environments at once/environments for different versions, for example:
conda create -n ml27 python=2.7 anaconda
conda create -n ml35 python=3.5 anaconda
conda create -n ml36 python=3.6 anaconda
Activating the environment:
conda activate ml
Installing additional packages/modules for a specific environment (VirtualEnv):
conda install -n ml [package]
To work in scripts, you can create an environment file (let's call it: $HOME/.ml_env
):
export PYTHONPATH=/path/to/my/own/python_libs
export LD_LIBRARY_PATH=$HOME/anaconda3/lib:$ORACLE_HOME/lib
export PATH=$HOME/anaconda3/bin:$PATH:$HOME/bin
Then we add the trace in the SHELL scripts. lines:
#!/bin/bash
source $HOME/.ml_env
source activate ml
Useful ones references:
Indeed, using Anaconda is very convenient for a number of reasons:
- completely independent of the system Python environment, which is easy to configure for yourself, move to another machine, remove or reinstall, and at the same time without affecting or" breaking " the system Python
- all installed modules are compatible with each other and tested - Continuum Analytics takes care of this
- a lot of useful modules (especially for those who are engaged in machine learning) are already installed by default