5

I'm trying to:

import pygal
wm = pygal.Worldmap()

but it raises:

AttributeError: module 'pygal' has no attribute 'Worldmap'

Can anyone tell me what the problem is?

Dimitris Fasarakis Hilliard
  • 150,925
  • 31
  • 268
  • 253
Bruin
  • 125
  • 1
  • 2
  • 5

1 Answers1

11

You are probably looking at old documentation from what I can tell. The most recent docs state that you first need to install the map plugin with:

pip install pygal_maps_world

and then use it as:

import pygal
mm = pygal.maps.world.World()
Dimitris Fasarakis Hilliard
  • 150,925
  • 31
  • 268
  • 253