So after some trial, I had some further steps:
(1) I moved the folders “wx” and “wxPython” under
python24\lib\site-packages
to
\panda3d-1.2.3\direct\src
(2) seems like wxPython is an obsolete package (commented from the file init.py inside the folder), so we’ll use wx.
(3) if I changed my directory to c:\panda3d-1.2.3\direct\src, entered ppython interactive mode and type:
import wx
it would work.
(4) however, if my location was in other places than src folder, it would complained:
ImportError: No module named wx
(5) so I tried the following ways instead:
from direct import wx
from direct.wx import wx
from direct.wx import *
Neither of them would work, and they all complained about:
File "wx\__init__.py", line 42, in ?
ImportError: No module named wx._core
(6) It seemed that the problem was in the init.py file under wx. So I changed the code from
from wx._core import *
to
from direct.wx._core import *
(or)
from _core import *
(or)
import _core
Again, neither of them worked; and unfortunately at this step, it would crash ppython(Panda).
(7) So, any ideas? eg., are there any system variables I need to set?