From: <py...@ya...> - 2002-10-01 01:27:18
|
Hi there, I have read through the archives for the gnuplot, and I found that I'm having similar problems to the message posted on the 13th August 2002. I can't run the demo.py or test.py. I am able to type the 'import Gnuplot' command. My problem is that I am not able to correctly execute 'g =3D Gnuplot.Gnuplot()' I get this error message: >>> import Gnuplot >>> g =3D Gnuplot.Gnuplot() File "<stdin>", line 1 g =3D Gnuplot.Gnuplot() ^ SyntaxError: invalid syntax I have installed Numeric 18.4.1 and Gnuplot-py-1.6, because I am using python2.1. When I type 'print sys.path' after importing sys, it give me this: >>> print sys.path ['', '/usr/local/lib/python2.1', '/usr/local/lib/python2.1/plat-linux2', '/usr/local/lib/python2.1/lib-tk', '/usr/local/lib/python2.1/lib-dynload', '/usr/local/lib/python2.1/site-packages', '/usr/local/lib/python2.1/site-packages/Numeric'] I'm not sure if the Gnuplot package needs to be present as well? Any help will be most appreciated. Thanks Johnny http://mobile.yahoo.com.au - Yahoo! Messenger for SMS - Always be connected to your Messenger Friends |
From: Michael H. <hag...@jp...> - 2002-10-01 08:42:29
|
=?iso-8859-1?Q?Johnny_boi?= writes: > My problem is that I am not able to correctly execute 'g = > Gnuplot.Gnuplot()' > > I'm not sure if the Gnuplot package needs to be present as well? It definitely does. Gnuplot.py just talks to the gnuplot program, which does most of the work. Michael -- Michael Haggerty hag...@jp... |
From: <py...@ya...> - 2002-10-03 02:03:32
|
Hello Michael, I still have some setting up problems. But I now am able to see Gnuplot in the sys.path. >>> import sys >>> print sys.path ['', '/usr/local/lib/python2.1', '/usr/local/lib/python2.1/plat-linux2', '/usr/local/lib/python2.1/lib-tk', '/usr/local/lib/python2.1/lib-dynload', '/usr/local/lib/python2.1/site-packages', '/usr/local/lib/python2.1/site-packages/Gnuplot', '/usr/local/lib/python2.1/site-packages/Numeric'] When i tried the method before (using g = Gnuplot.Gnuplot()), i get the follow error message: >>> import Gnuplot >>> g = Gnuplot.Gnuplot() >>> sh: gnuplot: command not found I have no idea what "sh" means. I am still unable to run demo.py sh: gnuplot: command not found Traceback (most recent call last): File "demo.py", line 121, in ? demo() File "demo.py", line 40, in demo g.title('A simple example') # (optional) File "/usr/local/lib/python2.1/site-packages/Gnuplot/_Gnuplot.py", line 439, in title self.set_string('title', s) File "/usr/local/lib/python2.1/site-packages/Gnuplot/_Gnuplot.py", line 381, in set_string self('set %s "%s"' % (option, s)) File "/usr/local/lib/python2.1/site-packages/Gnuplot/_Gnuplot.py", line 206, in __call__ self.gnuplot(s) File "/usr/local/lib/python2.1/site-packages/Gnuplot/gp_unix.py", line 203, in __call__ self.flush() IOError: [Errno 32] Broken pipe Any help would be most appreciated. Thank you. Regards, Johnny http://mobile.yahoo.com.au - Yahoo! Messenger for SMS - Always be connected to your Messenger Friends |
From: Leonardo M. <lm...@ud...> - 2002-10-03 12:04:23
|
Hi Johnny > When i tried the method before (using > g = Gnuplot.Gnuplot()), i get the follow error > message: > > >>> import Gnuplot > >>> g = Gnuplot.Gnuplot() > >>> sh: gnuplot: command not found > > I have no idea what "sh" means. I think it means the unix shell, /bin/sh Do you have gnuplot installed ?. Is it in your path ? What do you get if you type "whereis gnuplot" from a shell (command line)? It should find it. In my case it looks like grisell: lmilano> whereis gnuplot gnuplot: /usr/bin/gnuplot /usr/share/gnuplot.gih /usr/share/man/man1/gnuplot.1.bz2 > I am still unable to run demo.py Sure, you have to solve the other problem first. Hope this helps. Best, -- Leo |
From: <py...@ya...> - 2002-10-04 02:28:53
|
Hello Leo, First of all thanks for the help, but it seems like I shall be needing more of it. After reading thru the gnuplot.info website, I think apart from installing gnuplot.py I have to install the gnuplot program itself. So I follow the installation instructions to install gnuplot-3.7.1. The instructions I used were ./configure make make install I hope this is right. Anyway when i type "whereis gnuplot" I get the following: [root@localhost root]# whereis gnuplot gnuplot: [root@localhost root]# so it obviously didn't install properly. What should i do? Can I uninstall in Linux? I am fairly new to Linux, so please forgive my trivial questions. Is there a step-by-step set of instructions for me to follow? Thank you. Regards, Johnny http://mobile.yahoo.com.au - Yahoo! Messenger for SMS - Always be connected to your Messenger Friends |
From: Leonardo M. <lm...@ud...> - 2002-10-04 02:37:30
|
Hi Johhny > First of all thanks for the help, but it seems like I > shall be needing more of it. You'll get it :-) > The instructions I used were > > ./configure > make > make install > > I hope this is right. Yes, it usually is > Anyway when i type "whereis gnuplot" I get the > following: > [root@localhost root]# whereis gnuplot > gnuplot: > [root@localhost root]# > > so it obviously didn't install properly. Unless there is some issue with whereis. How about typing "gnuplot" from a console ? Does it open a "gnuplot" session ? > What should i do? Can I uninstall in Linux? Yes, if you use a package manager. What distribution of Linux are you using ?. If you are new to Linux I would strongly recommend mandrake. Anyway, chances are your distro uses rpm, a package management software (very useful). > Is there a step-by-step set of instructions for me to > follow? Yes, but please tell us what distro you use, version of the distro, etc. Best leo |
From: <py...@ya...> - 2002-10-04 04:36:59
|
Hello again Leo, I tried typing "gnuplot" in the console, and all I get is: [root@localhost root]# gnuplot bash: gnuplot: command not found [root@localhost root]# hence there was no gnuplot session that opened up. The Linux distribution that I am using is Red Hat 7.1. I assume this is what you mean by the distribution. I have also installed Python2.1 and Numeric 18.4.1. Should I install and use Numeric 22 instead, even though I am using Python2.1? Anyway I think I should uninstall the gnuplot as well as gnuplot-py. Basically I should start from scratch. Is this recommended? Thanks for your ongoing help. Regards, Johnny http://mobile.yahoo.com.au - Yahoo! Messenger for SMS - Always be connected to your Messenger Friends |
From: Leonardo M. <lm...@ud...> - 2002-10-04 12:27:02
|
On Fri, 4 Oct 2002, Johnny boi wrote: > Hello again Leo, > > I tried typing "gnuplot" in the console, and all I get > is: > [root@localhost root]# gnuplot > bash: gnuplot: command not found > [root@localhost root]# Yeah. It probably installed the binary in a place not included in you path. If this is the case it is fixable: locate gnuplot |grep bin will probably tell you where it is, but then you'd have to either mofify the global path (/etc/profile) or do i for each user (~/.bash_profile). Much easier would be to use the packaging sysutem, which takes care of everything for you. You can go to an rpmfind.net mirror, such as: http://speakeasy.rpmfind.net Search for gnuplot and get a binary package for your distribution (in your case RH 7.1, package name ends in i386.rpm) Download this, and run as root: "rpm -Uvh package-name" That's it, it sould run after that. If you are thinking of working a lot in your system, it's worthwile upgrading, RH 7.1 is fairly old and Linux went a long way. As I said, Mandrake would probably best shot. Installing this package would mean opening the control panel, going to software managment, choosing install software, and typing gnuplot. More, Mandrake's 9 installation has a "scientific workstation" option that installs gnuplot and other nice goodies by default. Anyway, my 2cts, I strongly recommend sticking to the RPM packages whenever possible. RPM takes care of the software (installs/uninstalls properly, etc) > Should I install and use Numeric 22 instead, even > though I am using Python2.1? It may run and it shouldn't hurt > Anyway I think I should uninstall the gnuplot as well > as gnuplot-py. Basically I should start from scratch. > Is this recommended? I think it's extra work, just get gnuplot installed again and you are fine. Uninstalling from source is not trivial, there is no universal way to do it (check for a target in the Makefile, there probably is). That's why using rpm (or apt/get in Debian systems) is so cool. > Thanks for your ongoing help. My pleasure :-) Take care -- leo |
From: <py...@ya...> - 2002-10-04 23:49:31
|
Hi Leo, I'll try using rpm's, as soon as I finish downloading the required file(s). I was wondering is gnuplot-py compatible with wxPython? I'm trying to plot data with real time. Thank you. Johnny --------------------------------- Yahoo! Messenger for SMS- Always be connected to your Messenger Friends |
From: Leonardo M. <lm...@ud...> - 2002-10-05 15:42:15
|
> I was wondering is gnuplot-py compatible with wxPython? It is actually independent. Gnuplot-py talks to gnuplot and gnuplot does the plotting, opens windows, etc (it is a "wrapper" to gnuplot) > I'm trying to plot data with real time. Yes, you can do that. You loop within python, grab the data and send it to gnuplot using gnuplot-py. No problem :-) -- leo |
From: <py...@ya...> - 2002-10-09 01:10:40
|
Hi Leo, I was trying to install gnuplot, but it seems like there are alot of dependencies that are associated with gnuplot. Is there a package where it contains all the files I would need to install it? Or do i have to install each dependency one by one? Thanks. Johnny http://mobile.yahoo.com.au - Yahoo! Messenger for SMS - Always be connected to your Messenger Friends |
From: Andreas T. <ti...@rk...> - 2002-10-09 07:08:53
|
On Wed, 9 Oct 2002, [iso-8859-1] Johnny boi wrote: > I was trying to install gnuplot, but it seems like > there are alot of dependencies that are associated > with gnuplot. > > Is there a package where it contains all the files I > would need to install it? Or do i have to install each > dependency one by one? It depends from your Linux Distribution. In Debian GNU/Linux this is done by apt-get install gnuplot automagically. Kind regards Andreas. |
From: Leonardo M. <lm...@ud...> - 2002-10-10 20:12:03
|
Hi Johnny Yes, you will need to satisfy all dependecies. Let's do something. I'll help you install gnuplot outside the list (to avoid going too off-topic) and then we come back to the list if there are gnuplot-py specific issues :-) -- leo > I was trying to install gnuplot, but it seems like > there are alot of dependencies that are associated > with gnuplot. > > Is there a package where it contains all the files I > would need to install it? Or do i have to install each > dependency one by one? > > Thanks. > > Johnny |