Ubuntu Python -dbg packages
Lee Harr
missive at hotmail.com
Mon Jan 7 20:01:01 EST 2013
>> Ok, so now I tried python3.3-dbg but I don't think the pyqt
>> modules are compiled for 3.3 and that may be preventing
>> the import there.
>>
>> Those extension modules would need to be compiled for
>> an exactly matching python interpreter, right?
>
> For Windows visual C compiler, that is true. I do not know about gcc on
> *nix. I have gotten the impression that it is not necessarily so, except
> as the C api has changed in a way that affects the extension library.
> (Given that 3.3 is 3 months old, after 6 months of alpha/beta releases,
> and has some major improvements, it is past time for libraries that need
> recompiling to be so.)
Well... lets just say that with the ubuntu python3.3 package it doesn't work:
$ python3.3
Python 3.3.0 (default, Sep 29 2012, 17:17:45)
[GCC 4.7.2] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import PyQt4
>>> import PyQt4.QtCore
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named 'PyQt4.QtCore'
[plus a whole other problem...]
Error in sys.excepthook:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/apport_python_hook.py", line 64, in apport_excepthook
from apport.fileutils import likely_packaged, get_recent_crashes
File "/usr/lib/python3/dist-packages/apport/__init__.py", line 4, in <module>
from apport.report import Report
File "/usr/lib/python3/dist-packages/apport/report.py", line 30, in <module>
import apport.fileutils
File "/usr/lib/python3/dist-packages/apport/fileutils.py", line 23, in <module>
from apport.packaging_impl import impl as packaging
File "/usr/lib/python3/dist-packages/apport/packaging_impl.py", line 20, in <module>
import apt
File "/usr/lib/python3/dist-packages/apt/__init__.py", line 21, in <module>
import apt_pkg
ImportError: No module named 'apt_pkg'
Original exception was:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named 'PyQt4.QtCore'
>> So, python3-dbg _should_ be able to import this?
>
> Given that python3 and python3-dbg import the same PyQt4 file, and that
> you spell PyQt4.QtCore the same (I checked), I am as surprised as you.
Ok. I will file a Ubuntu bug report.
> >>> import test.test_imp as t; t.test_main()
This does not work for me:
$ python3
Python 3.2.3 (default, Oct 19 2012, 19:53:57)
[GCC 4.7.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import test
>>> test.test_imp
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: 'module' object has no attribute 'test_imp'
$ python3.3
Python 3.3.0 (default, Sep 29 2012, 17:17:45)
[GCC 4.7.2] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import test
>>> test.test_imp
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: 'module' object has no attribute 'test_imp'
[plus that whole Error in sys.excepthook thing too...]
Should this be another bug report for the ubuntu packages?
More information about the Python-list
mailing list