pip install -r requirements.txt, I get the following error during the stage where it is installing
REQUIRED DEPENDENCIES AND EXTENSIONS numpy: yes [not found. pip may install it below.] dateutil: yes [dateutil was not found. It is required for date axis support. pip/easy_install may attempt to install it after matplotlib.] tornado: yes [tornado was not found. It is required for the WebAgg backend. pip/easy_install may attempt to install it after matplotlib.] pyparsing: yes [pyparsing was not found. It is required for mathtext support. pip/easy_install may attempt to install it after matplotlib.] pycxx: yes [Couldn't import. Using local copy.] libagg: yes [pkg-config information for 'libagg' could not be found. Using local copy.] freetype: no [pkg-config information for 'freetype2' could not be found.]
The following required packages can not be built: * freetype
pip install -r requirements.txt also install freetype? How should freetype be installed in Ubuntu 12.04 so it works with
pip will not install system-level dependencies. This means
pip will not install RPM(s) (Redhat based systems) or DEB(s) (Debian based systems).
To install system dependencies you will need to use one of the following methods depending on your system.
apt-get install libfreetype6-dev
To search for packages on Ubuntu/Debian based systems:
apt-cache search <string>
apt-cache search freetype | grep dev
yum -y install freetype-devel
To search for packages on Redhat/CentOS/Fedora based systems:
yum search <string>
yum search freetype | grep devel
Mac OS X: (via Homebrew)
brew install freetype
To search for packages on Mac OS X based systems:
brew search <string>
brew search freetype
I had to install libxft-dev in order to enable matplotlib on ubuntu server 14.04.
sudo apt-get install libfreetype6-dev libxft-dev
And then I could use
sudo easy_install matplotlib
A workaround is to do
sudo apt-get install pkg-config which I found in this github issue.
None of the existing answers worked for me to upgrade matplotlib on Ubuntu. This is what ultimately work for me:
$ sudo apt-get install build-dep python-matplotlib $ pip install matplotlib --upgrade
This command will download all dependencies.
For python 2.x
sudo apt-get install python-matplotlib
For python 3.x
sudo apt-get install python3-matplotlib
After installing, you can try
(sudo) pip install matplotlib
On Ubuntu, it worked after I installed
$sudo apt-get install blt-dev $pip install matplotlib
I’m using Mint an none of this answers worked for me, I needed to:
sudo apt-get install build-essential g++
I had the same issue with Python 3.6 on Windows, but then I switched to Python 3.5.2 and everything works fine.