Python 2.7 does not install matplotlib

Hi, I am trying to install matplotlib on my mac. I have Lion OS X.

my version of python 2.7.1 (this is what it says when I run it from the terminal)

every time I install matplotlib, it emits this error

 matplotlib 1.1.0 cannot be installed on this disk. matplotlib requires System python 2.7 to install. 

I am new to the python world and I need a tool to chart a few things ... so a clear explanation is much appreciated.

Thanks!

+6
source share
4 answers

You install the binary package that a specific system python expects. You better build from the source.

Just try installing it from pip:

 pip install numpy pip install matplotlib 

If you don’t have a pip yet, you can set it like this:

 wget "http://peak.telecommunity.com/dist/ez_setup.py" python ez_setup.py easy_install pip 

If this fails, follow the @Nolen Royalty guide , which he mentioned in the comments

+4
source

I tried installing python in various ways to get numpy, scipy and matplotlib to work together, and this is a huge pain. Your exact python version will dictate the version of numpy, scipy and matlplotlib that will work for you.

To date, the easiest solution I have found is to use the previously created Enthought package. He takes care of all these issues with one simple installer. You can get some additional software like Mayavi (an interactive 3D building tool), but there are not too many.

If you are a student (or have ever been from the very beginning of email), you can download the entire Enthought package for free here . Or you can visit Enthought's home at www.enthought.com . All you have to do is select an academic license and then insert a letter that ends in .edu.

I even think that there are free trial versions that should solve the problem. I have never tried a single trial version, but even if it is a limited time, you can use a trial version and then see exactly which versions of each package you need to install. Its a little more round, but it should work.

+3
source

I tried installing numpy, scipy and matplolib on my Mac Book Pro, which Lion worked on many times, and all of them failed. The correct Nolen recipe is pretty close, but some of the matplotlib tests were weird. The method that worked for me can be found on the Install Python, virtualenv, NumPy, SciPy, matplotlib and IPython page on Lion

0
source

Since you indicate that you are new to Python, I recommend installing matplotlib using MacPorts. First install macports http://www.macports.org/install.php then run install port py27-matplotlib

A few years ago there were some additional steps, but now everything is simple. You need to make sure that you have installed the macports python environment, but this is stated in the documentation.

Good luck

0
source

Source: https://habr.com/ru/post/914177/


All Articles