Re: Ubuntu Python -dbg packages

Discussion in 'Python' started by Lee Harr, Jan 8, 2013.

  1. Lee Harr

    Lee Harr Guest


    >> 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?
     
    Lee Harr, Jan 8, 2013
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. SPE - Stani's Python Editor
    Replies:
    1
    Views:
    474
    SPE - Stani's Python Editor
    Apr 29, 2008
  2. Lee Harr

    Ubuntu Python -dbg packages

    Lee Harr, Jan 6, 2013, in forum: Python
    Replies:
    0
    Views:
    146
    Lee Harr
    Jan 6, 2013
  3. Terry Reedy

    Re: Ubuntu Python -dbg packages

    Terry Reedy, Jan 6, 2013, in forum: Python
    Replies:
    0
    Views:
    118
    Terry Reedy
    Jan 6, 2013
  4. Lee Harr

    Re: Ubuntu Python -dbg packages

    Lee Harr, Jan 6, 2013, in forum: Python
    Replies:
    0
    Views:
    120
    Lee Harr
    Jan 6, 2013
  5. Terry Reedy

    Re: Ubuntu Python -dbg packages

    Terry Reedy, Jan 7, 2013, in forum: Python
    Replies:
    0
    Views:
    133
    Terry Reedy
    Jan 7, 2013
Loading...

Share This Page