Build Python3.5 + matplotlib environment on Ubuntu 12 using Anaconda

Since matplotlib is provided only up to Python2 in the standard package of Ubuntu 12, I was looking for how to use the latest Python3.5 (as of July 4, 2016) [Anaconda](https: //) I found something called www.continuum.io/).

Anaconda not only supports Windows, OS X, and Linux platforms, but also supports Python 2.7 and 3.5, 32bit and 64bit, which is quite substantial. If that's true, I'm pretty happy, so I tried it.

Anaconda seems to be all-in-one and contains a considerable amount of libraries, and requires at least 329M of disk space for the installer alone and 1.3G after installation. We recommend that you check the free space before installing.

$ du -hs Anaconda3-4.1.0-Linux-x86.sh 
329M	Anaconda3-4.1.0-Linux-x86.sh
$ du -hs anaconda3
1.3G	anaconda3

That's why I installed Anaconda!

Go to Anaconda Official Website and download the installer. This time, I downloaded the Linux (32bit) version of Python3.5 (Anaconda3-4.1.0-Linux-x86.sh). Run the downloaded file to install it.

$ bash Anaconda3-4.1.0-Linux-x86.sh
Welcome to Anaconda3 4.1.0 (by Continuum Analytics, Inc.)

In order to continue the installation process, please review the license
agreement.
Please, press ENTER to continue
>>> 

Just press the [Enter] key.

================
Anaconda License
================

Copyright 2016, Continuum Analytics, Inc.

All rights reserved under the 3-clause BSD License:
(abridgement)

Do you approve the license terms? [yes|no]
>>> 

Anaconda Reisen will be displayed. If you like, enter yes and press [Enter].

Anaconda3 will now be installed into this location:
/home/hachi/anaconda3

  - Press ENTER to confirm the location
  - Press CTRL-C to abort the installation
  - Or specify a different location below

[/home/hachi/anaconda3] >>> 

Perhaps can I install it in the home directory of the currently logged in user (/ home / hachi / anaconda3 in this case)? I think you've heard that, so just press [Enter].

PREFIX=/home/hachi/anaconda3
installing: python-3.5.1-5 ...
(abridgement)
Python 3.5.1 :: Continuum Analytics, Inc.
creating default environment...
installation finished.
Do you wish the installer to prepend the Anaconda3 install location
to PATH in your /home/hachi/.bashrc ? [yes|no]
[no] >>> 

Can I add the Anaconda3 path after the installation is complete after a while? (Maybe), but if you add it, it will be a problem elsewhere, so enter "no" this time and press [Enter].

You may wish to edit your .bashrc or prepend the Anaconda3 install location:

$ export PATH=/home/hachi/anaconda3/bin:$PATH

Thank you for installing Anaconda3!

Share your notebooks and packages on Anaconda Cloud!
Sign up for free: https://anaconda.org

The installation is complete, so check the version. In the case of Ubuntu 12, the python command was version 2.X and the python3 command was version 3.X, but in the case of Anaconda, both python and python3 seem to be version 3, so be careful. May be needed.

$ anaconda3/bin/python --version
Python 3.5.1 :: Anaconda 4.1.0 (32-bit)
$ anaconda3/bin/python3 --version
Python 3.5.1 :: Anaconda 4.1.0 (32-bit)

It seems that the Python version is a little old, so use the conda command to upgrade it.

$ anaconda3/bin/conda upgrade -y --all
Fetching package metadata .......
Solving package specifications: ..........
(abridgement)
Extracting packages ...
[      COMPLETE      ]|###################################################| 100%
Unlinking packages ...
[      COMPLETE      ]|###################################################| 100%
Linking packages ...
[      COMPLETE      ]|###################################################| 100%

Check the version again.

$ anaconda3/bin/python --version
Python 3.5.2 :: Anaconda custom (32-bit)

It seems that the latest Python could be installed on Ubuntu 12.

Try to draw a graph

Since it seems that it has been installed, try date_demo.py published on matploblib. I will try it.

$ anaconda3/bin/python date_demo.py
/home/hachi/anaconda3/lib/python3.5/site-packages/matplotlib/font_manager.py:273: UserWarning: Matplotlib is building the font cache using fc-list. This may take a moment.
  warnings.warn('Matplotlib is building the font cache using fc-list. This may take a moment.')

The first time you will be prompted to create a font cache, wait a minute.

anaconda3-date_demo.png

It was displayed!

Anaconda may be good

Although the capacity is large, I think that the environment could be built with almost no effort. Even if the Python version is slightly different depending on the OS and compatibility is a concern, using Anaconda seems to be able to unify all with the same version. Not only can you quickly build an environment for drawing graphs, but you can also use it for the purpose of unifying the environment.

Recommended Posts

Build Python3.5 + matplotlib environment on Ubuntu 12 using Anaconda
Build Python 3.8 + Pipenv environment on Ubuntu 18.04
Build Python3 and OpenCV environment on Ubuntu 18.04
Build Python environment with Anaconda on Mac
build Python on Ubuntu
How to build a Python environment using Virtualenv on Ubuntu 18.04 LTS
Build python environment with pyenv on EC2 (ubuntu)
Use matplotlib on Ubuntu 12 & Python
Build python3 environment with ubuntu 16.04
Build Python environment on Windows
Build python environment on windows
# 2 Build a Python environment on AWS EC2 instance (ubuntu18.04)
Build a Python environment on your Mac using pyenv
Build a Python development environment using pyenv on MacOS
Prepare Python development environment on Ubuntu
Anaconda python environment construction on Windows 10
Building a Python environment on Ubuntu
Introducing Python using pyenv on Ubuntu 20.04
Preparing python using vscode on ubuntu
Build a python3 environment on CentOS7
Python3.6 environment construction (using Win environment Anaconda)
OpenCV3 & Python3 environment construction on Ubuntu
Build an environment for machine learning using Python on MacOSX
How to build a new python virtual environment on Ubuntu
Build an Ubuntu python development environment on Google Cloud Platform
Until building a Python development environment using pyenv on Ubuntu 20.04
Python 2.7, 3.4, 3.5 extension module build environment on Windows
Build a python environment on MacOS (Catallina)
Python virtual environment and packages on Ubuntu
Steps to install Python environment on Ubuntu
Created Ubuntu, Python, OpenCV environment on Docker
Build a Python + OpenCV environment on Cloud9
[Python] Japanese localization of matplotlib on Ubuntu
Build a Python environment on your Mac with Anaconda and PyCharm
# 3 Build a Python (Django) environment on AWS EC2 instance (ubuntu18.04) part2
Build Python environment on Ubuntu (when pip is not the default)
Build Python + django + nginx + MySQL environment using docekr
Simply build a Python 3 execution environment on Windows
[Latest] How to build Java environment on Ubuntu
Install python package in personal environment on Ubuntu
Build a python environment with ansible on centos6
Build a Python environment on Mac (Mountain Lion)
Python development on Ubuntu on AWS EC2 (using JupyterLab)
[0] TensorFlow-GPU environment construction built with Anaconda on Ubuntu
Build a Python development environment on your Mac
Try to build python and anaconda environment on Mac (by pyenv, conda)
[Venv] Create a python virtual environment on Ubuntu
[Node-RED] Execute Python on Anaconda virtual environment from Node-RED [Anaconda] [Python]
Build Python3 + flask environment on GCP Compute Engine
Build a Kubernetes environment for development on Ubuntu
Try using tensorflow ① Build python environment and introduce tensorflow
Install Python 3.3 on Ubuntu 12.04
How to build Java environment on Ubuntu (Linux)
Build a Python development environment on Raspberry Pi
How to build an environment for using multiple versions of Python on Mac
Build a GVim-based Python development environment on Windows 10 (3) GVim8.0 & Python3.6
Build an OpenCV4 environment on Raspberry Pi using Poetry
Install Python3 on Mac and build environment [Definitive Edition]
Build a Django development environment using pyenv-virtualenv on Mac
Build a machine learning Python environment on Mac OS
Create a comfortable Python 3 (Anaconda) development environment on windows