Emerson
Emerson

Reputation: 797

Installing matplotlib under Windows

I'm trying to install matplotlib under Windows Vista. Both python itself and numpy are working for me.

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

No module named matplotlib

Any ideas how to get matplotlib working?

Upvotes: 6

Views: 75018

Answers (5)

Seth Projnabrata
Seth Projnabrata

Reputation: 143

Open Command Prompt

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

Matplotlib requires some of the following dependencies:

FreeType libpng NumPy setuptools cycler dateutil kiwisolver pyparsing

Upvotes: -1

Rajiv Nair
Rajiv Nair

Reputation: 21

If you are installing matplotlib under windows using anaconda. Here are the steps..

I am using Anaconda 1.8.7

  1. Goto your Anaconda Navigator and choose Environments
  2. Click on the arrow and choose Open terminal
  3. Type conda install matplotlib

That should do the trick. For specific versions and to install onto specific environments within annaconda you can utilise the = and -n / name option

https://conda.io/docs/commands/conda-install.html Matplotlib Installation using command prompt / Annaconda Terminal

Upvotes: 0

gvr
gvr

Reputation: 161

you can install by pip install matplotlib

Make sure that you already installed setuptools, numpy, python-dateutil, pytz, pyparsing, and cycler before that.

Upvotes: 16

edvaldig
edvaldig

Reputation: 2299

from pylab import * 

This works on a proper the default scipy/pylab/matplotlib setup. And to get you started:

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

Matplotlib is a part of the pylab suite

Upvotes: 0

joaquin
joaquin

Reputation: 85603

basemap is not the installer for matplotlib.
basemap is a library of the matplotlib toolkit for plotting 2D data on maps, you need to indepently install matplotlib to use it.

You can get matplotlib from here

Upvotes: 9

Related Questions