I can't run the demos

This is frustrating. I can't run the demos because they all require one or more modules that I don't have. For example:

% python demos/demo/ListCtrl.py
Traceback (most recent call last):
   File "demos/demo/ListCtrl.py", line 17, in <module>
     import images
   File "/home/daniel/Projects/Wordlibro/Python/demos/demo/images.py", line 4, in <module>
     from wx.lib.embeddedimage import PyEmbeddedImage
ImportError: No module named embeddedimage

% python demos/demo/ListCtrl_edit.py
Traceback (most recent call last):
   File "demos/demo/ListCtrl_edit.py", line 150, in <module>
     import run
   File "/home/daniel/Projects/Wordlibro/Python/demos/demo/run.py", line 21, in <module>
     import wx.lib.inspection
ImportError: No module named inspection

I actually had a similar problem with wxGrid. At least in that case I was able to edit the file to remove all the extraneous module, but this is not easy to do. The demos are not going to be very useful if I have to be constantly editing them to remove modules I don't understand just so I can run them and figure out what they do. It is difficult to fix code that you can't understand. :frowning:

Daniel.

I’m not sure what you’re doing, but I install the demos and they “just work” since they’re self-contained. I’ve gotten them to work repeatedly on Windows and Ubuntu with no issues (except for the ones that require cairo, which I don’t have installed). On Windows, you just double-click a link that’s installed. On Ubuntu, you run “demo.py” from the “wxPython2.8 Docs and Demos\demo” folder.

···

On Fri, Jan 15, 2010 at 4:21 PM, Daniel Carrera dcarrera@gmail.com wrote:

This is frustrating. I can’t run the demos because they all require one or more modules that I don’t have. For example:

% python demos/demo/ListCtrl.py

Traceback (most recent call last):

File “demos/demo/ListCtrl.py”, line 17, in

import  images

File “/home/daniel/Projects/Wordlibro/Python/demos/demo/images.py”, line 4, in

from wx.lib.embeddedimage import PyEmbeddedImage

ImportError: No module named embeddedimage

% python demos/demo/ListCtrl_edit.py

Traceback (most recent call last):

File “demos/demo/ListCtrl_edit.py”, line 150, in

import run

File “/home/daniel/Projects/Wordlibro/Python/demos/demo/run.py”, line 21, in

import wx.lib.inspection

ImportError: No module named inspection

I actually had a similar problem with wxGrid. At least in that case I was able to edit the file to remove all the extraneous module, but this is not easy to do. The demos are not going to be very useful if I have to be constantly editing them to remove modules I don’t understand just so I can run them and figure out what they do. It is difficult to fix code that you can’t understand. :frowning:

Daniel.

Mike Driscoll

Blog: http://blog.pythonlibrary.org

I could be wrong, but I don’t think the demos are intended to be run this way. Try running the file “demo.py” or “demo.pyw” (I’ve seen both versions) in the top-level demo directory; it will open a GUI that lists and runs all of the different control demos. This is what I always do, and I’ve never seen these errors - and I definitely don’t have wx.lib.inspection installed either.

-Nat

···

On Fri, Jan 15, 2010 at 2:21 PM, Daniel Carrera dcarrera@gmail.com wrote:

This is frustrating. I can’t run the demos because they all require one or more modules that I don’t have. For example:

% python demos/demo/ListCtrl.py

Traceback (most recent call last):

File “demos/demo/ListCtrl.py”, line 17, in

import  images

File “/home/daniel/Projects/Wordlibro/Python/demos/demo/images.py”, line 4, in

from wx.lib.embeddedimage import PyEmbeddedImage

ImportError: No module named embeddedimage

% python demos/demo/ListCtrl_edit.py

Traceback (most recent call last):

File “demos/demo/ListCtrl_edit.py”, line 150, in

import run

File “/home/daniel/Projects/Wordlibro/Python/demos/demo/run.py”, line 21, in

import wx.lib.inspection

ImportError: No module named inspection

Nathaniel Echols wrote:

I could be wrong, but I don't think the demos are intended to be run this way. Try running the file "demo.py" or "demo.pyw" (I've seen both versions) in the top-level demo directory; it will open a GUI that lists and runs all of the different control demos. This is what I always do, and I've never seen these errors - and I definitely don't have wx.lib.inspection installed either.

No luck.

% python demo.py
Traceback (most recent call last):
   File "demo.py", line 3, in <module>
     import Main
   File "/home/daniel/Projects/Wordlibro/Python/demos/demo/Main.py", line 57, in <module>
     import wx.aui
ImportError: No module named aui

:frowning:

Hi,

Nathaniel Echols wrote:

I could be wrong, but I don't think the demos are intended to be run this
way. Try running the file "demo.py" or "demo.pyw" (I've seen both versions)
in the top-level demo directory; it will open a GUI that lists and runs all
of the different control demos. This is what I always do, and I've never
seen these errors - and I definitely don't have wx.lib.inspection installed
either.

No luck.

% python demo.py
Traceback (most recent call last):
File "demo.py", line 3, in <module>
import Main
File "/home/daniel/Projects/Wordlibro/Python/demos/demo/Main.py", line 57,
in <module>
import wx.aui
ImportError: No module named aui

The demos can be run both from the main demo.py and standalone. I know
next to nothing about Linux, but I suspect your machine is picking up
the wrong wxPython version.

Try this:

import wx
print wx.VERSION_STRING

And let us know shich wxPython version is picked up. If it is >= 2.8,
your wx installation is messed up.

Andrea.

"Imagination Is The Only Weapon In The War Against Reality."
http://xoomer.alice.it/infinity77/

···

2010/1/15 Daniel Carrera <dcarrera@gmail.com>:

Hi,

···

On Jan 15, 2010, at 4:34 PM, Daniel Carrera wrote:

Nathaniel Echols wrote:

I could be wrong, but I don't think the demos are intended to be run this way. Try running the file "demo.py" or "demo.pyw" (I've seen both versions) in the top-level demo directory; it will open a GUI that lists and runs all of the different control demos. This is what I always do, and I've never seen these errors - and I definitely don't have wx.lib.inspection installed either.

No luck.

% python demo.py
Traceback (most recent call last):
File "demo.py", line 3, in <module>
   import Main
File "/home/daniel/Projects/Wordlibro/Python/demos/demo/Main.py", line 57, in <module>
   import wx.aui
ImportError: No module named aui

You must still be running with wxPython 2.6. These other the errors for missing modules your seeing are all for things added in 2.8.

Cody

You're probably using an older version of wxPython[1]. If you're on debian or ubuntu then install python-wxgtk2.8 and either remove python-wxgtk2.6 or see the recent thread here about how to set the default verison.

[1] You can easily find out what version you have by running

  python -c 'import wx; print wx.version'

···

On 1/15/10 2:21 PM, Daniel Carrera wrote:

This is frustrating. I can't run the demos because they all require one
or more modules that I don't have. For example:

--
Robin Dunn
Software Craftsman

Andrea Gavana wrote:

The demos can be run both from the main demo.py and standalone. I know
next to nothing about Linux, but I suspect your machine is picking up
the wrong wxPython version.

Try this:

import wx
print wx.VERSION_STRING

And let us know shich wxPython version is picked up. If it is >= 2.8,
your wx installation is messed up.

I have wxPython 2.6.3.2. Is that bad?

Cody Precord wrote:

You must still be running with wxPython 2.6. These other the errors for missing modules your seeing are all for things added in 2.8.

Ok. I'll download the latest wxPython. Thanks.

Robin Dunn wrote:

You're probably using an older version of wxPython[1]. If you're on debian or ubuntu then install python-wxgtk2.8 and either remove python-wxgtk2.6 or see the recent thread here about how to set the default verison.

WHOO HOO!!! THANKS!

And you also saved me from installing wxPython from source and ending up with two copies of wxPython 2.8 on my system.

And btw, yes, the ListCtrl widget looks precisely correct. So this is definitely the widget I'm looking for.

Thanks again.

Cheers,
Daniel.