Reputation: 882
Take this as an example:
I'm trying to get matplotlib properly installed inside a virtualenv located in my home directory. Should I do this:
sudo apt-get build-dep python-matplotlib
Prior to activating my virtualenv and doing this?
pip install matplotlib
I read somewhere that doing build-dep
might be needed to install some headers used by pip to compile packages successfully. And, if this is true for matplotlib, is it for every other package, such as ipython or numpy?
Important: I'm using a separate version of Python (Python 3.3, compiled from source) for the virtualenv, not the system version, which is Python 2.7 in my Ubuntu 12.04 system.
Upvotes: 2
Views: 2763
Reputation: 2710
I have found the answer by SevakPrime to be incorrect, after experiences with installing numpy and matplotlib on three computers.
Enrique's plan works and not doing sudo apt-get build-dep python-matplotlib
doesn't work. The same is true for numpy
, for which the string for build-dep
is python-numpy
.
The following may appear: E: You must put some 'source' URIs in your sources.list. The cure for that was provided by Gunnar Hjalmarsson here. You will find Software & Updates on the System Settings panel.
Upvotes: 0
Reputation: 938
That depends on what flags you've used to compile your Python version and what you're trying to get out of matplotlib. It is unlikely that you've done something so very different from the default that it would break when using the standard matplotlib. So, you should go ahead and just
pip install matplotlib
without bothering with
sudo apt-get build-dep python-matplotlib
If for some reason you need to compile matplotlib for your system (e.g. different architecture), then go ahead and use build-dep.
Upvotes: 1