I am on Ubuntu 16.04.4 LTS. Currently learning Julia. Julia uses PyPlot as it backend for plotting. PyPlot requires Python and matplotlib installed on system.
My Ubuntu came with both Python(2 & 3) installed. I installed matplotlib using this command sudo apt-get install python3-matplotlib
. I checked matplotlib version and it is Matplotlib 1.5.1. But whenerver I try to plot using PyPlot as backend julia> pyplot()
,
Julia's output is : WARNING: You are using Matplotlib 1.5.1, which is no longer officialy supported by the Plots community. To ensure smooth Plots.jl integration update your Matplotlib library to a version >= 2.0.0
Thus I tried to upgrade matplotlib using the pip, and it says my matplotlib version is up-to-date. From the output of pip command sudo pip install --upgrade matplotlib
is:
The directory '/home/yousuf/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag. The directory '/home/yousuf/.cache/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag. Requirement already up-to-date: matplotlib in /usr/local/lib/python2.7/dist-packages Requirement already up-to-date: numpy>=1.7.1 in /usr/local/lib/python2.7/dist-packages (from matplotlib) Requirement already up-to-date: six>=1.10 in /usr/local/lib/python2.7/dist-packages (from matplotlib) Requirement already up-to-date: python-dateutil>=2.1 in /usr/local/lib/python2.7/dist-packages (from matplotlib) Requirement already up-to-date: backports.functools_lru_cache in /usr/local/lib/python2.7/dist-packages (from matplotlib) Requirement already up-to-date: subprocess32 in /usr/local/lib/python2.7/dist-packages (from matplotlib) Requirement already up-to-date: pytz in /usr/local/lib/python2.7/dist-packages (from matplotlib) Requirement already up-to-date: cycler>=0.10 in /usr/local/lib/python2.7/dist-packages (from matplotlib) Requirement already up-to-date: pyparsing!=2.0.4,!=2.1.2,!=2.1.6,>=2.0.1 in /usr/local/lib/python2.7/dist-packages (from matplotlib)
It seems, from this output, pip tries to upgrade matplotlib for Python2 and 1.5.1 is the latest version for it. But Julia and PyPlot uses Python3 as I set up to use it.