Install matplotlib on Windows

I am trying to install matplotlib under Windows Vista. Both python and numpy work for me.

I installed matplotlib via the basemap-1.0.2.win32-py2.7 and followed the official instructions . But executing from matplotlib import * gives me the following error:

No module named matplotlib

Any ideas how to get matplotlib to work?

+5
source share
5 answers

basemap is not an installer for matplotlib.
basemap is a matplotlib toolkit library for building 2D data on maps, you need to install matplotlib yourself to use it.

You can get matplotlib from here

+9
source

you can install pip install matplotlib

Before doing this, make sure you have already installed setuptools, numpy, python-dateutil, pytz, pyparsing, and cycler .

+13
source
 from pylab import * 

This works by properly setting scipy / pylab / matplotlib by default. And so you get started:

 > hist(randn(10000)) > show() 

Matplotlib is part of the pylab suite

0
source

If you install matplotlib under Windows using anaconda. Here are the steps ..

I am using Anaconda 1.8.7

  1. Go to your Anaconda Navigator and select Environments
  2. Click the arrow and select Open Terminal
  3. Type conda install matplotlib

This should do the trick. For specific versions and for installation in specific environments in annaconda, you can use the = and -n / name option

https://conda.io/docs/commands/conda-install.html Installing Matplotlib using the command line / Annaconda Terminal

0
source

Open command line

C: \ Users \ Uname> python -m pip install matplotlib

Matplotlib requires some of the following dependencies:

FreeType libpng NumPy setuptools cycler dateutil kiwisolver pyparsing

0
source

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


All Articles