I\'ve been trying to install Python\'s matplotlib library for use with PyPlot, for use with Julia. I managed to get everything in place except for this one final library, an
I would recommend to use Anaconda or Miniconda. In my experience with many Windows users, this is the simplest way to install packages such as matplotlib.
Anaconda comes with many packages for scientists. Matplotlib works out of the box. Just install as user not root.
If you don't want all packages of Ananconda use Miniconda
Both ways of installation (Anaconda or Miniconda) provide conda
. It is an improved pip
/virtualenv
.
You can install matplotilb with this command:
conda install matplotlib
You can create a new environment and install the packages you like:
conda create -n my_project35 python=3.5
activate my_project35
conda install matplotlib
or
conda create -n my_project27 python=2.7
activate my_project27
conda install matplotlib
pip
You can still use pip
. conda
"understands" what it is doing.
One snake is enough!
[This is for folks using the Linux Bash Shell on Windows 10.]
If you don't want to go the Anaconda route, you can install freetype (and png) by executing the following in the Windows 10 Bash shell:
sudo apt-get install freetype6-dev
The above command will also automatically install libpng. However, due to an error, the system will not 'realize' it has installed freetype, so you'll need to manually install pkg-config:
sudo apt-get install pkg-config
Thereafter you should be able to install matplotlib via pip without further incident.
sudo pip install matplotlib