[egenix-users] Egenix-mx-base install not working (with virtualenv, python 2.7 on ubuntu linux 11.04)

M.-A. Lemburg mal at egenix.com
Thu Jul 28 22:46:33 CEST 2011

M.-A. Lemburg wrote:
> Leonardo Santagada wrote:
>> I can't install egenix-mx-base on ubuntu, neither using easy_install
>> [1] nor using "python setup.py install"[2]. Somehow installing using
>> easy_install it thinks that I'm on a windows machine, which clearly is
>> not the case[3]. Is there some workaround?
>> [1]:
>> $ python setup.py install
>> running install
>> no build data file 'build/build-py2.7_ucs4.pck' found
>> running build
>> running mx_autoconf
>> error: None
> Could you investigate where the above error message originates ?
> It appears to hint to the cause of the problem.

We have doug a little deeper into this.

It appears that either virtualenv or the Ubuntu version in
question is broken:

lemburg at ubuntu1104:~/tmp/testenv$ bin/python
Python 2.7.1+ (r271:86832, Apr 11 2011, 18:05:24)
[GCC 4.5.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import sysconfig
>>> sysconfig.get_config_h_filename()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python2.7/sysconfig.py", line 397, in get_config_h_filename
    inc_dir = get_path('platinclude').replace("/usr/local","/usr",1)+(sys.pydebug and "_d" or "")
  File "/usr/lib/python2.7/sysconfig.py", line 426, in get_path
    return get_paths(scheme, vars, expand)[name]
  File "/usr/lib/python2.7/sysconfig.py", line 417, in get_paths
    return _expand_vars(scheme, vars)
  File "/usr/lib/python2.7/sysconfig.py", line 172, in _expand_vars
    _extend_dict(vars, get_config_vars())
  File "/usr/lib/python2.7/sysconfig.py", line 457, in get_config_vars
  File "/usr/lib/python2.7/sysconfig.py", line 310, in _init_posix
    raise IOError(msg)
IOError: invalid Python installation: unable to open
/home/lemburg/tmp/testenv/local/lib/python2.7/config/Makefile (No such file or directory)

sysconfig.py was obviously patched by the Debian/Ubuntu folks
in a way that is incompatible with the virtualenv generated

Here's the same thing using an unpatched Python installation
and virtualenv:

tmp/testpy27> bin/python
Python 2.7.1 (r271:86832, Apr 19 2011, 12:07:08)
[GCC 4.5.0 20100604 [gcc-4_5-branch revision 160292]] on linux2
Type "help", "copyright", "credits" or "license" for more information.
Loaded pyinteractive.py.

>>> import sysconfig
>>> sysconfig.get_config_h_filename()

I'm afraid there's not a lot we can do, other than perhaps
add a work-around to eGenix mx Base. Please report this to

Marc-Andre Lemburg

Professional Python Services directly from the Source  (#1, Jul 28 2011)
>>> Python/Zope Consulting and Support ...        http://www.egenix.com/
>>> mxODBC.Zope.Database.Adapter ...             http://zope.egenix.com/
>>> mxODBC, mxDateTime, mxTextTools ...        http://python.egenix.com/

::: Try our new mxODBC.Connect Python Database Interface for free ! ::::

   eGenix.com Software, Skills and Services GmbH  Pastor-Loeh-Str.48
    D-40764 Langenfeld, Germany. CEO Dipl.-Math. Marc-Andre Lemburg
           Registered at Amtsgericht Duesseldorf: HRB 46611

More information about the egenix-users mailing list