This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author hoel
Recipients hoel
Date 2011-02-10.13:47:45
SpamBayes Score 1.288336e-07
Marked as misclassified No
Message-id <1297345666.23.0.22592660459.issue11171@psf.upfronthosting.co.za>
In-reply-to
Content
I do get (with 2.7.1):

> python
Traceback (most recent call last):
  File "/usr/local/gltools/python/Python-2.7/lib/python2.7/site.py", line 553, in <module>
    main()
  File "/usr/local/gltools/python/Python-2.7/lib/python2.7/site.py", line 535, in main
    known_paths = addusersitepackages(known_paths)
  File "/usr/local/gltools/python/Python-2.7/lib/python2.7/site.py", line 268, in addusersitepackages
    user_site = getusersitepackages()
  File "/usr/local/gltools/python/Python-2.7/lib/python2.7/site.py", line 243, in getusersitepackages
    user_base = getuserbase() # this will also set USER_BASE
  File "/usr/local/gltools/python/Python-2.7/lib/python2.7/site.py", line 233, in getuserbase
    USER_BASE = get_config_var('userbase')
  File "/usr/local/gltools/python/Python-2.7/lib/python2.7/sysconfig.py", line 535, in get_config_var
    return get_config_vars().get(name)
  File "/usr/local/gltools/python/Python-2.7/lib/python2.7/sysconfig.py", line 434, in get_config_vars
    _init_posix(_CONFIG_VARS)
  File "/usr/local/gltools/python/Python-2.7/lib/python2.7/sysconfig.py", line 287, in _init_posix
    raise IOError(msg)
IOError: invalid Python installation: unable to open /usr/local/gltools/python/Python-2.7/lib/python2.7/config/Makefile (No such file or directory)

The Makefile is platform dependendent und is located at

/usr/local/gltools/python/Python-2.7/linux_x86_64/lib/python2.7/config/Makefile

This problem is fixed for me by a simple pach:

> diff -c /usr/local/gltools/python/Python-2.7/lib/python2.7/sysconfig.py /usr/local/gltools/python/Python-2.7/lib/python2.7/sysconfig.py~
*** /usr/local/gltools/python/Python-2.7/lib/python2.7/sysconfig.py     2011-02-10 14:33:34.000015000 +0100
--- /usr/local/gltools/python/Python-2.7/lib/python2.7/sysconfig.py~    2011-02-10 14:28:17.001245000 +0100
***************
*** 271,277 ****
  def _get_makefile_filename():
      if _PYTHON_BUILD:
          return os.path.join(_PROJECT_BASE, "Makefile")
!     return os.path.join(get_path('platstdlib'), "config", "Makefile")
  
  
  def _init_posix(vars):
--- 271,277 ----
  def _get_makefile_filename():
      if _PYTHON_BUILD:
          return os.path.join(_PROJECT_BASE, "Makefile")
!     return os.path.join(get_path('stdlib'), "config", "Makefile")
  
  
  def _init_posix(vars):
History
Date User Action Args
2011-02-10 13:47:46hoelsetrecipients: + hoel
2011-02-10 13:47:46hoelsetmessageid: <1297345666.23.0.22592660459.issue11171@psf.upfronthosting.co.za>
2011-02-10 13:47:45hoellinkissue11171 messages
2011-02-10 13:47:45hoelcreate