Installing Anaconda on Ubuntu

Anaconda is a great tool to work with Tensorflow, Caffeine or other frameworks. It provides users to install all depedencies from one source.

To install Anaconda environment on Ubuntu, need it to be installed from anaconda.org. I installed Anaconda3-5.0.0.1-Linux-x86_64.sh and run it by writing on console:

bash Anaconda3-5.0.0.1-Linux-x86_64.sh

If it cannot find the file, go to the directory Downloads and than type this command again.

I installed the last version of Anaconda. You can use older versions by creating its special environment also.

I prefer to use both Python 2.7 and Python 3.5 on the same machine. Because some applications have circular dependencies, to avoid them we have to select older or newer version of Python. It’s useful to have 2.7 and 3.5 versions of Python with different environments.

After installation, close and restart the terminal window again.

Python 2.7 Environment

To create Python 2.7 environment with Anaconda, type it on terminal window:

conda create -n py2.7 python=2.7

After installing, you have to type this command to activate Python 2.7 environment.

source activate py2.7

To exit from any environment, just type this:

source deactivate

 

Python 3.5 Environment

Just like creating 2.7 environment, we use the same commands to make it happen. Type this to create Python 3.5 environment:

conda create -n py3.5 python=3.5

Now, it’s time to activate that environment by typing this:

source activate py3.5

 

Add a Comment

Your email address will not be published. Required fields are marked *