[issue15111] Wrong ImportError message with importlib

Yury Selivanov report at bugs.python.org
Fri Oct 5 15:12:17 CEST 2012


Yury Selivanov added the comment:

I don't know why, but it seems that the bug reappeared in 3.3.

Examples:

1. --------------- (python 3.4 from repo)

yury at sxair ~/dev/py/python (master) $ ./python.exe 
Python 3.4.0a0 (default, Oct  5 2012, 15:08:35) 
[GCC 4.2.1 Compatible Apple Clang 4.1 ((tags/Apple/clang-421.11.65))] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from distutils import msvc9compiler
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: cannot import name msvc9compiler

2. --------------- (python 3.3.0 from macports)

yury at sxair ~/dev/py/python (master) $ python3.3
Python 3.3.0 (default, Oct  5 2012, 13:41:24) 
[GCC 4.2.1 Compatible Apple Clang 4.1 ((tags/Apple/clang-421.11.65))] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from distutils import msvc9compiler
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: cannot import name msvc9compiler


3. ----------- (python 3.2 from macports)

yury at sxair ~/dev/py/python (master) $ python3.2
Python 3.2.2 (default, Sep 27 2012, 13:31:01) 
[GCC 4.2.1 Compatible Apple Clang 4.1 ((tags/Apple/clang-421.11.65))] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from distutils import msvc9compiler
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.2/lib/python3.2/distutils/msvc9compiler.py", line 27, in <module>
    import winreg
ImportError: No module named winreg

Platform: macos x 10.8

Please reopen the issue.

----------
nosy: +yselivanov

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue15111>
_______________________________________


More information about the Python-bugs-list mailing list