Install help

OK here is what I found the packages are indeed in /usr/lib/python2.3/site-packages like you said but python2.3 doesn't seem to be able to load them

{thinking occured}
whereis python
python: /usr/lib/python2.3 /usr/local/bin/python /usr/local/bin/python2.3 /usr/local/lib/python2.3

I then tried copying them from /usr/lib ... to /usr/local/lib and that seems to do it (darn fs diffs between distros and this is supposed to be LSB compliant or whatever)

linux:/usr/local/lib/python2.3/site-packages # cp -r /usr/lib/python2.3/site-packages/wxPython/ ./
linux:/usr/local/lib/python2.3/site-packages # ls
. .. README wx wxPython

then I get
ben@linux:/usr/local/lib/python2.3/site-packages> python
Python 2.3 (#1, Aug 30 2004, 14:09:31)
[GCC 3.3 20030226 (prerelease) (SuSE Linux)] on linux2
Type "help", "copyright", "credits" or "license" for more information.

import wx

{hey it works kinda}

import wxPython

../src/common/object.cpp(224): assert "sm_classTable->Get(m_className) == NULL" failed: class already in RTTI table - have you used IMPLEMENT_DYNAMIC_CLASS() twice (may be by linking some object module(s) twice)? [in child thread]
Trace/breakpoint trap

{dang what gives}

ben@linux:/usr/lib/python2.3> ls
site-packages
ben@linux:/usr/lib/python2.3> cd site-packages/
ben@linux:/usr/lib/python2.3/site-packages> ls
wx wxPython
ben@linux:/usr/lib/python2.3/site-packages> cd wx
wx wxPython
ben@linux:/usr/lib/python2.3/site-packages> cd wxPython/
ben@linux:/usr/lib/python2.3/site-packages/wxPython> ls
__init__.py calendar.pyc gizmos.py help.pyc lib tools
__init__.pyc controls.py gizmos.pyc html.py misc.py windows.py
_wx.py controls.pyc glcanvas.py html.pyc misc.pyc windows.pyc
_wx.pyc core.py glcanvas.pyc htmlhelp.py ogl.py wizard.py
activex.py core.pyc grid.py htmlhelp.pyc ogl.pyc wizard.pyc
activex.pyc gdi.py grid.pyc iewin.py stc.py xrc.py
calendar.py gdi.pyc help.py iewin.pyc stc.pyc xrc.pyc
ben@linux:/usr/lib/python2.3/site-packages/wxPython>

Python 2.3 (#1, Aug 30 2004, 14:09:31)
[GCC 3.3 20030226 (prerelease) (SuSE Linux)] on linux2
Type "help", "copyright", "credits" or "license" for more information.

import wxPython

Traceback (most recent call last):
  File "<stdin>", line 1, in ?
ImportError: No module named wxPython

···

From: "Chris Barker" <Chris.Barker@noaa.gov>
Reply-To: wxPython-users@lists.wxwidgets.org
To: wxPython-users@lists.wxwidgets.org
Subject: Re: [wxPython-users] Install help
Date: Thu, 06 May 2004 10:04:11 -0700

Benjamin Hamilton wrote:

Thanks I tried the --nodeps flag and it did install
whereis wxPython
wxPython: /usr/lib/wxPython

but when I type
ben@linux:~> python
Python 2.3 (#1, Aug 30 2004, 14:09:31)
[GCC 3.3 20030226 (prerelease) (SuSE Linux)] on linux2
Type "help", "copyright", "credits" or "license" for more information.

import wx

you should have a wx and wxPython directory in <something>/lib/python2.3/site-packages

figure out where <something> is on your system (should be /usr/ or /usr/local/ ) and figure our where the rpm put the wx and wxPython dirs. then move around as appropriate. It may also be possible to have rpm install it in the right place, but I don't remember the flag for right now, and it doesn't always work.

I'm guessing your python2.3 is in usr/local/

By the way, /usr/lib/wxPython is where the libs are for wxPython, but NOT where the Python modules are.

Do you have more than one version of python installed on your system?

-Chris

--
Christopher Barker, Ph.D.
Oceanographer

NOAA/OR&R/HAZMAT (206) 526-6959 voice
7600 Sand Point Way NE (206) 526-6329 fax
Seattle, WA 98115 (206) 526-6317 main reception

Chris.Barker@noaa.gov

---------------------------------------------------------------------
To unsubscribe, e-mail: wxPython-users-unsubscribe@lists.wxwidgets.org
For additional commands, e-mail: wxPython-users-help@lists.wxwidgets.org

Benjamin Hamilton wrote:

then I get
ben@linux:/usr/local/lib/python2.3/site-packages> python
Python 2.3 (#1, Aug 30 2004, 14:09:31)
[GCC 3.3 20030226 (prerelease) (SuSE Linux)] on linux2
Type "help", "copyright", "credits" or "license" for more information.

import wx

{hey it works kinda}

import wxPython

../src/common/object.cpp(224): assert "sm_classTable->Get(m_className) == NULL" failed: class already in RTTI table - have you used IMPLEMENT_DYNAMIC_CLASS() twice (may be by linking some object module(s) twice)? [in child thread]
Trace/breakpoint trap

{dang what gives}

Somehow it is trying to import _core.so (and therefore the wxWidgets shared libs) a second time. I don't know what would cause it to do that. Python normally will ensure that extensions are loaded only once.

···

--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!