Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.xs4all.nl!newsfeed2.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.000 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'subject:Python': 0.05; 'importerror:': 0.05; 'python3': 0.05; 'api': 0.09; 'python': 0.09; '"can\'t': 0.09; 'difference,': 0.09; 'filesystem': 0.09; 'interpreter,': 0.09; 'invocation': 0.09; 'mode,': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'specific.': 0.09; 'terry': 0.09; 'windows,': 0.09; 'bug': 0.10; 'looked': 0.10; 'extension': 0.13; 'file,': 0.15; '(given': 0.16; '3.3,': 0.16; '3.3.': 0.16; 'basic,': 0.16; 'binaries': 0.16; 'compiler,': 0.16; 'easier.': 0.16; 'idle,': 0.16; 'mbcs': 0.16; 'oct': 0.16; 'packages:': 0.16; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'reedy': 0.16; 'skipped': 0.16; 'skips': 0.16; 'verbose': 0.16; 'wrote:': 0.17; 'instance,': 0.17; 'skip': 0.17; 'test.': 0.17; 'jan': 0.18; 'tests': 0.18; '>>>': 0.18; 'windows': 0.19; 'module': 0.19; 'import': 0.21; 'meant': 0.21; '"",': 0.22; 'gcc': 0.22; 'libraries': 0.22; 'sorry,': 0.22; 'runs': 0.22; 'matching': 0.23; 'tried': 0.25; 'header:In-Reply- To:1': 0.25; 'header:User-Agent:1': 0.26; '(most': 0.27; 'am,': 0.27; 'compiled': 0.27; 'library.': 0.27; 'there.': 0.28; 'header:X-Complaints-To:1': 0.28; 'this?': 0.28; 'skip:( 20': 0.28; 'run': 0.28; '>>>>': 0.29; 'releases,': 0.29; "skip:' 50": 0.29; 'surprised': 0.29; 'yes.': 0.29; 'skip:_ 10': 0.29; 'usually': 0.30; 'file': 0.32; 'running': 0.32; 'affects': 0.33; 'hopefully': 0.33; 'impression': 0.33; 'right?': 0.33; 'traceback': 0.33; 'true.': 0.33; 'ubuntu': 0.33; 'to:addr:python- list': 0.33; 'changed': 0.34; 'same.': 0.35; 'so,': 0.35; 'pm,': 0.35; 'there': 0.35; 'received:org': 0.36; 'except': 0.36; 'but': 0.36; 'modules': 0.36; 'visual': 0.36; 'test': 0.36; 'ok,': 0.37; 'why': 0.37; 'subject:: ': 0.38; 'some': 0.38; 'to:addr:python.org': 0.39; 'build': 0.39; 'header:Received:5': 0.40; 'think': 0.40; 'you.': 0.61; 'first': 0.61; 'mentioned': 0.63; 'necessarily': 0.63; 'more': 0.63; 'show': 0.63; 'stuck': 0.65; 'surprise': 0.65; 'gotten': 0.75; 'old,': 0.83; 'received:fios.verizon.net': 0.84; 'subject: -': 0.84; 'preventing': 0.91; 'spell': 0.91 X-Injected-Via-Gmane: http://gmane.org/ To: python-list@python.org From: Terry Reedy Subject: Re: Ubuntu Python -dbg packages Date: Sun, 06 Jan 2013 20:15:17 -0500 References: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Gmane-NNTP-Posting-Host: pool-173-75-251-66.phlapa.fios.verizon.net User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/17.0 Thunderbird/17.0 In-Reply-To: X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 103 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1357521369 news.xs4all.nl 6871 [2001:888:2000:d::a6]:47330 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:36313 On 1/6/2013 3:21 PM, Lee Harr wrote: > >> On 1/6/2013 8:42 AM, Lee Harr wrote: >>> >>> I am using: >>> Ubuntu 12.10 >>> Python 3.2.3 >> >> import has been considerably redone, and hopefully upgraded, in 3.3. > > > 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.) >>> I also have the ubuntu -dbg packages: >>> python3-dbg >>> python3-pyqt4-dbg >>> I don't understand why python3-dbg cannot import the PyQt4 modules... > >> Is PyQtr.__file__ the same here, as below? > > Yes. It's the same. > > Sorry, that's what I meant to show there. > > $ 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 PyQt4 >>>> PyQt4.__file__ > '/usr/lib/python3/dist-packages/PyQt4/__init__.py' >>>> > > > >>> $ python3-dbg >>> Python 3.2.3 (default, Oct 19 2012, 19:58:54) >>> [GCC 4.7.2] on linux2 >>>>>> import PyQt4 >>> [60323 refs] >>>>>> PyQt4.__file__ >>> '/usr/lib/python3/dist-packages/PyQt4/__init__.py' >>> [60323 refs] >>>>>> import PyQt4.QtCore >>> Traceback (most recent call last): >>> File "", line 1, in >>> ImportError: No module named QtCore >>> [150996 refs] > 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. Perhaps there is a bug in the import of the dbg build finding modules in packages, but that is so basic, that would surprise me also. Try running test/test_imp, _import, _importhooks, _importlib with both binaries (because you are looking for a different). On Windows, with 3.3, interactively in IDLE, I get >>> import test.test_imp as t; t.test_main() ... Ran 29 tests in 0.134s OK (skipped=1) ... Ran 48 tests in 0.953s OK (skipped=4) ... Ran 4 tests in 0.169s OK ... Ran 288 tests in 1.684s OK (skipped=2) Note that the above invocation runs in verbose mode, so if there is a difference, you can find the specific test. The skips are usually system specific. For instance, the one skip in the first batch is test_issue5604 (test.test_imp.ImportTests) ... skipped "can't run this test with mbcs as filesystem encoding" The others were for other posix-windows differences. > Any ideas about the python3-pyqt4-dbg modules mentioned originally? No. I stuck to what looked like might be easier. -- Terry Jan Reedy