Python - Matplotlib and Numpy on Debian/Ubuntu

jieforest發表於2012-05-28

There are `python-matplotlib` and `python-numpy` packages in the Debian/Ubunturepos.

However, if you want to run in avirtualenv (with no-site-packages), and pip install these packages from PyPI, youneed some system dependencies installed first to build with:

CODE:

$ sudo apt-get install build-essential python-dev libfreetype6-dev libpng-dev python-virtualenv

Then, you can create a virtualenv, and the installers for Numpy and Matplotlib will work:

CODE:

$ virtualenv env
$ cd env
$ source bin/activate
(env)$ pip install numpy matplotlib

...
...
Successfully installed numpy matplotlib
Cleaning up...

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/301743/viewspace-731269/,如需轉載,請註明出處,否則將追究法律責任。

相關文章