kujira70 / pythonxy

Automatically exported from code.google.com/p/pythonxy
0 stars 0 forks source link

Can not run example program - pygtk problem and path issues #153

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
If relevant, please answer to the following questions:
1. What version of Python(x,y) have you installed?

I used the xyweb-1.0.3 url link to download the latest full version 
(Python(x,y)-2.6.2.0)

2. Which components have you installed (Python(x,y) installer: component
page):

I selected the Full version but deselected WinMerge during detailed 
installation because I already have this installed on my PC.  I also have 
Notepad++, Wireshark and Gimp installed.

plugins?
3. Have you selected the option "Customize installation directories"?
     No

5. Where did you install Python(x,y) itself?
  default path
  Python is in c:\python26
  Pythonxy is in c:\program files\pythonxy

6. Have you installed Python(x,y):
     For "All users"

7. What is your operating system?
    Windows XP SP4

8. When you installed Python(x,y), were you logged in as :

    an administrator of the machine

10. Regarding installed softwares on your machine, how did you clean your
machine before installing Python(x,y) (multiple answers are possible):

  No previous versions of Python have been installed on this machine (I am 
a newby to Python)

What steps will reproduce the problem?
1. Run Pythonxy and then select IDLE
2. Open the file C:\Program 
Files\pythonxy\doc\Libraries\matplotlib\Examples\animation\simple_anim_gtk.
py and select Run Module
3.

What is the expected output? What do you see instead?

Not sure what the expected output is, probably a simple animation

I get the following error message:

Traceback (most recent call last):
  File "C:\Program 
Files\pythonxy\doc\Libraries\matplotlib\Examples\animation\simple_anim_gtk.
py", line 9, in <module> import matplotlib.pyplot as plt
  File "C:\Python26\lib\site-packages\matplotlib\pyplot.py", line 78, in 
<module> new_figure_manager, draw_if_interactive, show = pylab_setup()
  File "C:\Python26\lib\site-packages\matplotlib\backends\__init__.py", 
line 25, in pylab_setup globals(),locals(),[backend_name])
  File "C:\Python26\lib\site-
packages\matplotlib\backends\backend_gtkagg.py", line 10, in <module>     
from matplotlib.backends.backend_gtk import gtk, FigureManagerGTK, 
FigureCanvasGTK,\
  File "C:\Python26\lib\site-packages\matplotlib\backends\backend_gtk.py", 
line 11, in <module> raise ImportError("Gtk* backend requires pygtk to be 
installed.")
ImportError: Gtk* backend requires pygtk to be installed.

I then consulted a friend who is an expert Python user, except he doesn't 
use Windows at all.

He suggested that I type in:
Import gtk

When I did that I got this message:

>>> import gtk

Traceback (most recent call last):
  File "<pyshell#0>", line 1, in <module> import gtk
  File "C:\Python26\lib\site-packages\gtk-2.0\gtk\__init__.py", line 38, in 
<module> import gobject as _gobject
  File "C:\Python26\lib\site-packages\gtk-2.0\gobject\__init__.py", line 
30, in <module> from gobject.constants import *
  File "C:\Python26\lib\site-packages\gtk-2.0\gobject\constants.py", line 
22, in <module> from _gobject import type_from_name
ImportError: DLL load failed: The specified module could not be found.

My friend then directed me to: http://www.pygtk.org/downloads.html
to download and install pygtk.

I did this selecting the 2.12 version with Python 2.6

The error was still present and so we downloaded and installed PyCairo and 
PyGObject as well, again selecting the version with the closest date to 
Pythonxy.

The problem was still present and my friend lost interest and so I looked 
around myself.  I noticed two odd things:
1) The PYTHON_LIB path points to C:\Python26\libs\python25.lib  but no such 
file exists.  I tried manually changing this to 
C:\Python26\libs\python26.lib (which does exist) but this made no 
difference.

2) I ran Spyder and clicked on <Interactive Console> <show sys.path 
contents>

The very last entry contained an incorrect unix / rather than a Windows \
The entry is: C:\Python26\lib\site-packages\IPython/Extensions

Please provide any additional information below.

I generally choose to install non-windows system programs on a separate E: 
drive and that is where Notepad++, Wireshark, WinMerge and Gimp are 
installed.  However I spent some time reading the installation documents 
for Pythonxy and I got the impression that it was sensitive to where it was 
installed and so I chose to install it in the default path (c: drive).

No options were selected that altered the default path settings.

Original issue reported on code.google.com by dplh...@gmail.com on 18 Feb 2010 at 8:39

Attachments:

GoogleCodeExporter commented 9 years ago
Sorry, my machine is Windows XP SP3 (not SP4).

Thanks   Doug

Original comment by dplh...@gmail.com on 18 Feb 2010 at 11:53

GoogleCodeExporter commented 9 years ago
AFAIK, there are no PyGTK binaries which are actually working on Windows with 
Python
2.6. That's why PyGTK is no longer included in Python(x,y) since we switched 
from
Python 2.5 to Python 2.6.

If the situation evolves, I will gladly include PyGTK in Python(x,y)...

Original comment by pierre.raybaut on 27 Feb 2010 at 9:32

GoogleCodeExporter commented 9 years ago
I can using gtk with python(x,y)
by install
PyGTK - 
http://ftp.gnome.org/pub/GNOME/binaries/win32/pygtk/2.16/pygtk-2.16.0+glade.win3
2-py2.6.exe
PyCairo - 
http://ftp.gnome.org/pub/GNOME/binaries/win32/pycairo/1.8/pycairo-1.8.6.win32-py
2.6.exe
PyGobject - 
http://ftp.gnome.org/pub/GNOME/binaries/win32/pygobject/2.20/pygobject-2.20.0.wi
n32-py2.6.exe

and
GTK 2.1.6 Bundle - 
http://ftp.gnome.org/pub/gnome/binaries/win32/gtk+/2.16/gtk+-bundle_2.16.6-20100
207_win32.zip

Original comment by pch...@gmail.com on 6 Aug 2010 at 7:11