From: Roger F. <rf...@cy...> - 2003-10-27 20:47:40
|
I can't get started with version 1.7 on Windows XP Professional I am using the following packages: Python-2.3.2-1.exe win32all-157.exe Numeric-23.1.win32-py2.3.exe gp373w32.zip gnuplot-py-1.7.zip Here is a transcript of my attempt to run the demo from the Command Line: --------------------------------------------------- >C:\Python23\python demo.py gnuplot> set terminal windows gnuplot> set title "A simple example" gnuplot> set data style linespoints gnuplot> plot 'c:\docume~1\rogerf~1\locals~1\temp\tmphzycgx' notitle Please press return to continue... Traceback (most recent call last): File "demo.py", line 113, in ? demo() File "demo.py", line 39, in demo g.reset() File "C:\Python23\Lib\site-packages\Gnuplot\_Gnuplot.py", line 355, in reset self('reset') File "C:\Python23\Lib\site-packages\Gnuplot\_Gnuplot.py", line 199, in __call_ _ self.gnuplot(s) File "C:\Python23\Lib\site-packages\Gnuplot\gp_win32.py", line 125, in __call_ _ self.write(s + '\n') IOError: [Errno 22] Invalid argument -------------------------------------------------- Here is a transcript of my attempt to run the demo from PythonWin ----------------------------------------------------- PythonWin 2.3.2 (#49, Oct 2 2003, 20:02:00) [MSC v.1200 32 bit (Intel)] on win32. Portions Copyright 1994-2001 Mark Hammond (mha...@sk...) - see 'Help/About PythonWin' for further copyright information. >>> import Gnuplot >>> dir(Gnuplot) ['Data', 'DataError', 'Error', 'Errors', 'File', 'Func', 'Gnuplot', 'GnuplotOpts', 'GnuplotProcess', 'GridData', 'OptionError', 'PlotItem', 'PlotItems', '_Gnuplot', '__all__', '__builtins__', '__cvs_version__', '__doc__', '__file__', '__name__', '__path__', '__version__', 'gp', 'gp_win32', 'termdefs', 'test_persist', 'utils'] >>> Gnuplot.GnuplotOpts.gnuplot_command 'C:\\Program Files\\gp373w32\\pgnuplot.exe' >>> import demo Traceback (most recent call last): File "<interactive input>", line 1, in ? File "C:\Python23\Lib\site-packages\Gnuplot\demo.py", line 22, in ? import Gnuplot, Gnuplot.funcutils ImportError: No module named funcutils >>> import Gnuplot.funcutils Traceback (most recent call last): File "<interactive input>", line 1, in ? ImportError: No module named funcutils >>> ----------------------------------------------------- -Roger |
From: <kai...@t-...> - 2003-10-28 09:30:25
|
Can any Windows users help? The problem reported below seems to be pretty common among Windows users. I believe it is caused by Gnuplot.py not being able to find the pgnuplot.exe executable because it is not in the PATH or not installed. Are there any Windows users of Gnuplot.py who can come up with a way to diagnose the problem within the Gnuplot.py package so that users are not confronted with such a strange error message? It might help people recognize and fix the problem on their own. For example, is there a way to tell if a call to popen() fails under Windows? Ideally, it should work for the old python versions, too, where win32pipe.popen() as well as the new versions where os.popen() is used. But even a partial solution would be an improvement. Ideally, there would be a test in the gp_win32.GnuplotProcess constructor which generated a more descriptive exception in the case of errors. Otherwise, I guess I have to add a FAQ.txt question about this issue. Thanks, Michael Roger Frye wrote: > I can't get started with version 1.7 on Windows XP Professional > I am using the following packages: > Python-2.3.2-1.exe > win32all-157.exe > Numeric-23.1.win32-py2.3.exe > gp373w32.zip > gnuplot-py-1.7.zip > > Here is a transcript of my attempt to run the demo from the Command Line: > --------------------------------------------------- > >C:\Python23\python demo.py > gnuplot> set terminal windows > gnuplot> set title "A simple example" > gnuplot> set data style linespoints > gnuplot> plot 'c:\docume~1\rogerf~1\locals~1\temp\tmphzycgx' notitle > Please press return to continue... > > Traceback (most recent call last): > File "demo.py", line 113, in ? > demo() > File "demo.py", line 39, in demo > g.reset() > File "C:\Python23\Lib\site-packages\Gnuplot\_Gnuplot.py", line 355, > in reset > self('reset') > File "C:\Python23\Lib\site-packages\Gnuplot\_Gnuplot.py", line 199, > in __call_ > _ > self.gnuplot(s) > File "C:\Python23\Lib\site-packages\Gnuplot\gp_win32.py", line 125, > in __call_ > _ > self.write(s + '\n') > IOError: [Errno 22] Invalid argument > -------------------------------------------------- -- Michael Haggerty mh...@al... |
From: Roger F. <rf...@cy...> - 2003-10-28 20:06:14
|
Michael, > The problem reported below seems to be pretty common among Windows > users. I believe it is caused by Gnuplot.py not being able to find > the pgnuplot.exe executable because it is not in the PATH or not > installed. It may be true that there is a problem in finding pgnuplot.exe, but there also seems to be a problem in the structure of Gnuplot.py because it does not seem to contain funcutils. Here is the part of my original message the shows this problem: > >>> import demo > Traceback (most recent call last): > File "<interactive input>", line 1, in ? > File "C:\Python23\Lib\site-packages\Gnuplot\demo.py", line 22, in ? > import Gnuplot, Gnuplot.funcutils > ImportError: No module named funcutils > >>> import Gnuplot.funcutils > Traceback (most recent call last): > File "<interactive input>", line 1, in ? > ImportError: No module named funcutils -Roger |
From: Roger F. <rf...@cy...> - 2003-11-01 18:52:54
|
> I can't get started with version 1.7 on Windows XP Professional Fixed. I got Gnuplot-py working on Windows. The fix is to put an extra set of quotes in the gnuplot_command if there is a space in the path: gnuplot_command = r'"C:\Program Files\gp373w32\pgnuplot.exe"' My assertion that Gnuplot.funcutils was missing was erroneous. No excuse. I also experimented with setting prefer_inline_data to 1, but I found that the demo failed to produce surface plots in this case. -Roger |