Easy install, Setup error - ignore?

13 views
Skip to first unread message

chris

unread,
Oct 14, 2009, 10:26:58 AM10/14/09
to pycha
Hi,
The version in the Ubuntu repos is old 0.3.1 so I decided to remove it
and install the latest from your site.
I downloaded it and tried but it required I install python-setuptools.
Did that.
Then typed easy_install pycha and got message below:

sudo easy_install pycha
Processing pycha
error: Couldn't find a setup script in /home/chris/Downloads/
pycha-0.5.1/pycha

Seems like maybe I can ignore this error but wanted to report it as
maybe it needs a setup script so this error message isn't reported. Or
is this really an error?

Chris :)

chris

unread,
Oct 14, 2009, 10:37:15 AM10/14/09
to pycha
Well, I guess that was a real error. It didn't work.
For something that's supposed to be easy it doesn't really seem to be.
First have to install other stuff to get the install to work and then
the installer doesn't work.
Can I just copy these files into my python directory somewhere?
The more opaque these things are the more confusing it is to get
started with it.
Chris.

chris

unread,
Oct 14, 2009, 10:41:13 AM10/14/09
to pycha
Ok. Got it now. You cannot run the easy_install when there is a
directory with the same name present.
How silly is that? I changed to my home and ran it and it went out and
got the thing off the web.
Maybe let people know they shouldn't download it first because
easy_install gets real confused, which makes me confused.
Now if I can just figure out this pie chart dataset thing.
Chris :)

chris

unread,
Oct 14, 2009, 11:09:08 AM10/14/09
to pycha
Ah well, now with the new version the dataset labels are showing up.
That's good.
Have got results with a dataset like,

self.dataSet = (
('Food', ((0, 1),)),
('Rent', ((0, 2),)),
('Bus', ((0, 4),)),
('Net', ((0, 1.5),)),
)

Is this the simplest configuration of data that will go? I tried
changing the zeros and they didn't affect the graph. But removing them
causes trouble.

Also I'd like to get the graph label to show up on two lines. Instead
of "Food (12.5%)" more like,

Food
(12.5%)

Is there a way to do this? If not then I thought I'd perhaps write a
patch for an option that supports that. My labels will be longer than
this and with the percent it gets very long (causing formatting
issues).
Maybe an option with choices like: (percents, 2nd line percents, no
percents)...
Chris :)

Lorenzo Gil Sanchez

unread,
Nov 10, 2009, 1:09:25 PM11/10/09
to py...@googlegroups.com
Sorry for the late answer but I think the pycha website makes it
pretty clear you don't need to manually download pycha to install it:

""""
Pycha is distributed as a Python Egg so is quite easy to install. You
just need to type the following command:

easy_install pycha

And Easy Install will go to the Cheeseshop and grab the last pycha for
you. If will also install it for you at no extra cost
"""

2009/10/14 chris <chris...@gmail.com>:

Lorenzo Gil Sanchez

unread,
Nov 10, 2009, 1:15:31 PM11/10/09
to py...@googlegroups.com
2009/10/14 chris <chris...@gmail.com>:

>
> Ah well, now with the new version the dataset labels are showing up.
> That's good.
> Have got results with a dataset like,
>
>                self.dataSet = (
>                        ('Food', ((0, 1),)),
>                        ('Rent', ((0, 2),)),
>                        ('Bus', ((0, 4),)),
>                        ('Net', ((0, 1.5),)),
>                )
>
> Is this the simplest configuration of data that will go?

I think so

> I tried
> changing the zeros and they didn't affect the graph. But removing them
> causes trouble.
>

You need to understand what that tuple is: is a list of points where
the first element is the X coordinate and the second value is the Y
coordinate. That's the way you build a table of values from which you
draw the chart. Pie charts are pretty special since they don't use the
X coordinate at all since they are unidimensional and not
bidimensional. As the pycha code that deal with datasets is generic
for all kinds of charts the values have to be points too for piecharts
for consistency reasons.

> Also I'd like to get the graph label to show up on two lines. Instead
> of "Food (12.5%)" more like,
>
> Food
> (12.5%)
>
> Is there a way to do this? If not then I thought I'd perhaps write a
> patch for an option that supports that. My labels will be longer than
> this and with the percent it gets very long (causing formatting
> issues).

No, there is no way to do this. I suggest you to write a subclass of
the pycha.pie.PieChart class and redefine the _renderAxis method where
you have full control on how to draw the labels. That's the saner way
to acomplish what you want. Adding an option to pycha to draw the
labels will not be practical since everybody has his own preferences
about this.


Best regards,

Lorenzo

Reply all
Reply to author
Forward
0 new messages