Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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?

like image 711
Bruin Avatar asked Jun 13 '17 12:06

Bruin


1 Answers

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()
like image 65
Dimitris Fasarakis Hilliard Avatar answered Oct 11 '22 13:10

Dimitris Fasarakis Hilliard