Bug 594597

Summary: "pydoc -k" fails with sysconfig.py:375:_init_posix:DistutilsPlatformError: invalid Python installation: unable to open /usr/lib64/python2.6/config/Makefile (No such file or directory)
Product: [Fedora] Fedora Reporter: Jan Dvořák <mordae>
Component: pythonAssignee: Dave Malcolm <dmalcolm>
Status: CLOSED CURRENTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: 12CC: dmalcolm, ivazqueznet, james.antill, jonathansteffan
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard: abrt_hash:7a5ffbbd
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-07-02 14:29:40 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
File: backtrace none

Description Jan Dvořák 2010-05-21 06:38:43 UTC
abrt 1.0.9 detected a crash.

architecture: x86_64
cmdline: /usr/bin/python2.6 /usr/bin/pydoc -k pgsql
comment: Just executed `pydoc -k pgsql`.
component: python
executable: /usr/bin/pydoc
kernel: 2.6.32.12-115.fc12.x86_64
package: python-2.6.2-4.fc12
reason: sysconfig.py:375:_init_posix:DistutilsPlatformError: invalid Python installation: unable to open /usr/lib64/python2.6/config/Makefile (No such file or directory)
release: Fedora release 12 (Constantine)

backtrace
-----
sysconfig.py:375:_init_posix:DistutilsPlatformError: invalid Python installation: unable to open /usr/lib64/python2.6/config/Makefile (No such file or directory)

Traceback (most recent call last):
  File "/usr/bin/pydoc", line 5, in <module>
    pydoc.cli()
  File "/usr/lib64/python2.6/pydoc.py", line 2264, in cli
    apropos(val)
  File "/usr/lib64/python2.6/pydoc.py", line 1962, in apropos
    ModuleScanner().run(callback, key)
  File "/usr/lib64/python2.6/pydoc.py", line 1927, in run
    for importer, modname, ispkg in pkgutil.walk_packages(onerror=onerror):
  File "/usr/lib64/python2.6/pkgutil.py", line 125, in walk_packages
    for item in walk_packages(path, name+'.', onerror):
  File "/usr/lib64/python2.6/pkgutil.py", line 125, in walk_packages
    for item in walk_packages(path, name+'.', onerror):
  File "/usr/lib64/python2.6/pkgutil.py", line 110, in walk_packages
    __import__(name)
  File "/usr/lib64/python2.6/site-packages/numpy/distutils/fcompiler/__init__.py", line 59, in <module>
    class FCompiler(CCompiler):
  File "/usr/lib64/python2.6/site-packages/numpy/distutils/fcompiler/__init__.py", line 195, in FCompiler
    shared_lib_extension = get_config_var('SO')  # or .dll
  File "/usr/lib64/python2.6/distutils/sysconfig.py", line 579, in get_config_var
    return get_config_vars().get(name)
  File "/usr/lib64/python2.6/distutils/sysconfig.py", line 518, in get_config_vars
    func()
  File "/usr/lib64/python2.6/distutils/sysconfig.py", line 375, in _init_posix
    raise DistutilsPlatformError(my_msg)
DistutilsPlatformError: invalid Python installation: unable to open /usr/lib64/python2.6/config/Makefile (No such file or directory)

Local variables in innermost frame:
msg: IOError(2, 'No such file or directory')
g: {}
my_msg: 'invalid Python installation: unable to open /usr/lib64/python2.6/config/Makefile (No such file or directory)'
filename: '/usr/lib64/python2.6/config/Makefile'

Comment 1 Jan Dvořák 2010-05-21 06:38:46 UTC
Created attachment 415587 [details]
File: backtrace

Comment 2 Dave Malcolm 2010-07-01 23:24:47 UTC
Thanks for filing this bug report; sorry about the late response.

This sounds like a duplicate of bug 531901 (sysconfig failing), along with bug 461419 (pydoc not being robust in the face of failing modules).

What is the output of running the command:
  rpm -q python python-devel

Are you still able to reproduce this bug?

Thanks

Comment 3 Jan Dvořák 2010-07-02 05:08:05 UTC
Nope, not anymore. Feel free to close.

Comment 4 Dave Malcolm 2010-07-02 14:29:40 UTC
Thanks for the info! 

Closing this bug, as per comment #2.