[PyKDE] Complete newbie mac question...

Ed garlic39 at es3.us
Fri Nov 5 07:27:21 GMT 2004


FCC: /home/schwartz/Mail/filecopy_mozilla
--text follows this line--
Timothy,

> Python 2.3.3 (#1, Aug 23 2004, 20:06:57)
> [GCC 3.3 20030304 (Apple Computer, Inc. build 1640)] on darwin
> Type "help", "copyright", "credits" or "license" for more information.
> >>> import qt
> Fatal Python error: Interpreter not initialized (version mismatch?)

I've gotten this error from "import qt" when the problem was that sip
was not built correctly (although I was trying to use Python from
Fink, so it's not exactly the same as your case).  Try testing sip
from where you built it:

  cd siplib
  python
  >>> import sip

If a "bus error" error occurs (perhaps after a few seconds), then the
problem may be that SIP not linked properly for the version of python
you are using.  (If you don't have Fink installed, I assume that there
is only one version of python on your system. If you do have more than
one version of python installed, make sure you are consistently using
the one you want.)

My first suggestion is to just try rebuilding sip carefully if you
have not already done so. For Fink, that was not sufficient and I
found the correct linking options with:

  python
  >>> import distutils.sysconfig
  >>> distutils.sysconfig.get_config_var('LDSHARED')
  'gcc -L/sw/lib -bundle -flat_namespace -undefined suppress'

And gave the following option to configure.py:

  LFLAGS_PLUGIN="-bundle -flat_namespace -undefined suppress"

I expect the non-Fink version of python to return something different
("-L/sw/lib" certainly won't be the same), so trying using what your
system reports from get_config_var.

-- Ed
   garlic39 at es3.us




More information about the PyQt mailing list