[Python-Dev] Python 2.7 Won't Build

Tom Browder tom.browder at gmail.com
Mon Sep 20 18:56:52 CEST 2010

On Mon, Sep 20, 2010 at 10:12, Ronald Oussoren <ronaldoussoren at mac.com> wrote:
> On 20 Sep, 2010,at 04:31 PM, Tom Browder <tom.browder at gmail.com> wrote:
> Continuing on with investigating Python 2.7 build problems, one
> problem I just discovered is a different installation on one 64-bit
> system (Debian Lenny) versus another (Ubuntu 10.04.1 LTS).
> I used gcc-4.5.1 on both systems, with no *PY* environment variables set.
> On Debian I got two directories:
> /usr/local/lib64/python2.7
> /usr/local/lib/python2.7
> and only the first had the "config" subdirectory.
> On Ubuntu I got only
> /usr/local/lib/python2.7

Okay, that leads to an install problem with bazaar on the Debian beast:

Could not find platform dependent libraries <exec_prefix>
Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>]
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/site.py", line 549, in <module>
  File "/usr/local/lib/python2.7/site.py", line 531, in main
    known_paths = addusersitepackages(known_paths)
  File "/usr/local/lib/python2.7/site.py", line 264, in addusersitepackages
    user_site = getusersitepackages()
  File "/usr/local/lib/python2.7/site.py", line 239, in getusersitepackages
    user_base = getuserbase() # this will also set USER_BASE
  File "/usr/local/lib/python2.7/site.py", line 229, in getuserbase
    USER_BASE = get_config_var('userbase')
  File "/usr/local/lib/python2.7/sysconfig.py", line 518, in get_config_var
    return get_config_vars().get(name)
  File "/usr/local/lib/python2.7/sysconfig.py", line 421, in get_config_vars
  File "/usr/local/lib/python2.7/sysconfig.py", line 275, in _init_posix
    raise IOError(msg)
IOError: invalid Python installation: unable to open
/usr/local/lib/python2.7/config/Makefile (No such file or directory)

I tried setting PYTHONHOME to various things but none worked.  The
problem is that the config directory is under /usr/local/lib64 and
none of the documents I have found describes how to handle that
situation.  All the environment variables seem to be for libraries,
modules, and executables, and there is no reference to any lib64.

The pkg-config program looks as if it could be used by such packages
as bazaar but it doesn't look like it's one of the usual installation

I'll go to the bazaar mailing list while awaiting an answer here.



More information about the Python-Dev mailing list