From mal at egenix.com Thu Jul 28 22:46:33 2011 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Jul 28 21:46:40 2011 Subject: [egenix-users] Egenix-mx-base install not working (with virtualenv, python 2.7 on ubuntu linux 11.04) In-Reply-To: <4DD16AA8.1020105@egenix.com> References: <4DD16AA8.1020105@egenix.com> Message-ID: <4E31BC99.7060700@egenix.com> 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@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 "", line 1, in 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 _init_posix(_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 environment. 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() '/home/lemburg/tmp/testpy27/include/python2.7/pyconfig.h' >>> 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 Ubuntu/Debian. Thanks, -- Marc-Andre Lemburg eGenix.com 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 http://www.egenix.com/company/contact/ From mal at egenix.com Thu Jul 28 23:14:00 2011 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Jul 28 22:14:08 2011 Subject: [egenix-users] Egenix-mx-base install not working (with virtualenv, python 2.7 on ubuntu linux 11.04) In-Reply-To: <4E31BC99.7060700@egenix.com> References: <4DD16AA8.1020105@egenix.com> <4E31BC99.7060700@egenix.com> Message-ID: <4E31C308.4090801@egenix.com> M.-A. Lemburg wrote: > 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@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 "", line 1, in > 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 > _init_posix(_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 > environment. > > 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() > '/home/lemburg/tmp/testpy27/include/python2.7/pyconfig.h' >>>> > > 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 > Ubuntu/Debian. The fact that Python cannot read its own Makefile is a major showstopper for any build script. I wonder why this hasn't been corrected yet. Without access to the Makefile settings, distutils/setuptools/ distribute have no way of finding out about compiler and linker settings, include directories, etc. -- Marc-Andre Lemburg eGenix.com 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 http://www.egenix.com/company/contact/ From mal at egenix.com Thu Jul 28 23:35:38 2011 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Jul 28 22:35:46 2011 Subject: [egenix-users] Egenix-mx-base install not working (with virtualenv, python 2.7 on ubuntu linux 11.04) In-Reply-To: <4E31C308.4090801@egenix.com> References: <4DD16AA8.1020105@egenix.com> <4E31BC99.7060700@egenix.com> <4E31C308.4090801@egenix.com> Message-ID: <4E31C81A.4090107@egenix.com> M.-A. Lemburg wrote: > M.-A. Lemburg wrote: >> 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@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 "", line 1, in >> 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 >> _init_posix(_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 >> environment. >> >> 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() >> '/home/lemburg/tmp/testpy27/include/python2.7/pyconfig.h' >>>>> >> >> 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 >> Ubuntu/Debian. > > The fact that Python cannot read its own Makefile is a major > showstopper for any build script. I wonder why this hasn't > been corrected yet. > > Without access to the Makefile settings, distutils/setuptools/ > distribute have no way of finding out about compiler and linker > settings, include directories, etc. I should probably also mention that all this does work outside the virtualenv. -- Marc-Andre Lemburg eGenix.com 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 http://www.egenix.com/company/contact/