Aug-01-2018, 02:20 PM
Hi
I discovered the pygal library thanks to your site:
https://python-forum.io/pages/interpreter.php
So I tried to make this program work at home, under ubuntu 18.04.
I tried to install pygal according to 3 differents methods:
-----------------------------------
pip install pygal
-----------------------------------
Installing .deb
python3-pygal_2.4.0-1_all.deb (61.9 KiB)
Found here :
https://launchpad.net/ubuntu/cosmic/amd6...al/2.4.0-1
-----------------------------------
sudo apt update
sudo apt-get install python-pygal
-----------------------------------
But every time, I get an error message...
Thank you !
I discovered the pygal library thanks to your site:
https://python-forum.io/pages/interpreter.php
import pygal # http://blog.codeeval.com/codeevalblog/2014 # most popular coding languages according to @codeeval # python for the win! w00t! data = [ ["Python", 30.3], ["Java", 22.2], ["C++", 13], ["Ruby", 10.6], ["Javascript", 5.2], ["C#", 5], ["C", 4.1], ["PHP", 3.3], ["Perl", 1.6], ["Go", 1.5], ["Haskell", 1.2], ["Scala", 1], ["Objective-C", 0.4], ["Clojure", 0.2], ["Bash", 0.1], ["Lua", 0.04], ["TCL", 0.03] ] # Make a Pygal chart pie_chart = pygal.Bar() # add a title pie_chart.title = "CodeEval Most Popular Coding Languages of 2014" # add the data for label, data_points in data: pie_chart.add(label, data_points) # Render the chart pie_chart.render()It's amazing to be able to make graphics as easily! (Pygal)

I tried to install pygal according to 3 differents methods:
-----------------------------------
pip install pygal
-----------------------------------
Installing .deb
python3-pygal_2.4.0-1_all.deb (61.9 KiB)
Found here :
https://launchpad.net/ubuntu/cosmic/amd6...al/2.4.0-1
-----------------------------------
sudo apt update
sudo apt-get install python-pygal
-----------------------------------
But every time, I get an error message...

Error:Traceback (most recent call last):
File "/media/yonnel/SSD-1T/yonnel/Dropbox/00- DIY/11- Python/02- Essais/pygal.py", line 8, in <module>
import pygal
File "/media/yonnel/SSD-1T/yonnel/Dropbox/00- DIY/11- Python/02- Essais/pygal.py", line 36, in <module>
pie_chart = pygal.Pie()
AttributeError: module 'pygal' has no attribute 'Pie'
Someone would have already used pygal under Unbutu 18.04?Thank you !