64-bit bytecode compatibility (was Re: [PEAK] ez_setup on 64-bit linux problem)
At 09:49 AM 9/29/2005 -0400, Viren Shah wrote:
[I sent this earlier without being a subscriber and it was sent to the moderation queue so I'm resending it after subscribing]
Hi, I'm running a 64-bit Fedora Core 3 with python 2.3.4. I'm trying to install setuptools to use with Trac, and get the following error:
[root@Mrdumpling ~]$ python ez_setup.py Downloading http://cheeseshop.python.org/packages/2.3/s/setuptools/setuptools-0.6a4-py2.... Traceback (most recent call last): File "ez_setup.py", line 206, in ? main(sys.argv[1:]) File "ez_setup.py", line 141, in main from setuptools.command.easy_install import main OverflowError: signed integer is greater than maximum
I get the same type of error if I try installing setuptools manually. I figure this has to do with the 64-bit nature of the OS and python, but not being a python person, don't know what a workaround would be.
Any ideas?
Hm. It sounds like perhaps the 64-bit Python in question isn't able to read bytecode for Python from a 32-bit Python version. You'll need to download the setuptools source archive from PyPI and install it using "python setup.py install" instead. In the meantime, I'm going to inquire on Python-Dev about whether a 64-bit Python should be able to read 32-bit bytecode, as I was under the impression Python's bytecode format was supposed to be cross-platform. See e.g.: http://mail.python.org/pipermail/python-list/2004-March/213039.html
Phillip J. Eby wrote:
At 09:49 AM 9/29/2005 -0400, Viren Shah wrote:
[I sent this earlier without being a subscriber and it was sent to the moderation queue so I'm resending it after subscribing]
Hi, I'm running a 64-bit Fedora Core 3 with python 2.3.4. I'm trying to install setuptools to use with Trac, and get the following error:
[root@Mrdumpling ~]$ python ez_setup.py Downloading http://cheeseshop.python.org/packages/2.3/s/setuptools/setuptools-0.6a4-py2....
Traceback (most recent call last): File "ez_setup.py", line 206, in ? main(sys.argv[1:]) File "ez_setup.py", line 141, in main from setuptools.command.easy_install import main OverflowError: signed integer is greater than maximum
I get the same type of error if I try installing setuptools manually. I figure this has to do with the 64-bit nature of the OS and python, but not being a python person, don't know what a workaround would be.
Any ideas?
Hm. It sounds like perhaps the 64-bit Python in question isn't able to read bytecode for Python from a 32-bit Python version. You'll need to download the setuptools source archive from PyPI and install it using "python setup.py install" instead.
<snip> [Thanks for the quick response] I tried downloading and installing setuptools-0.6a4.zip with the same type of result: [root@Mrdumpling setuptools-0.6a4]# python setup.py install running install running bdist_egg running egg_info writing ./setuptools.egg-info/PKG-INFO writing top-level names to ./setuptools.egg-info/top_level.txt writing entry points to ./setuptools.egg-info/entry_points.txt installing library code to build/bdist.linux-x86_64/egg running install_lib running build_py creating build creating build/lib copying pkg_resources.py -> build/lib copying easy_install.py -> build/lib creating build/lib/setuptools copying setuptools/depends.py -> build/lib/setuptools copying setuptools/archive_util.py -> build/lib/setuptools copying setuptools/dist.py -> build/lib/setuptools copying setuptools/__init__.py -> build/lib/setuptools copying setuptools/extension.py -> build/lib/setuptools copying setuptools/sandbox.py -> build/lib/setuptools copying setuptools/package_index.py -> build/lib/setuptools creating build/lib/setuptools/tests copying setuptools/tests/doctest.py -> build/lib/setuptools/tests copying setuptools/tests/__init__.py -> build/lib/setuptools/tests copying setuptools/tests/test_resources.py -> build/lib/setuptools/tests creating build/lib/setuptools/command copying setuptools/command/test.py -> build/lib/setuptools/command copying setuptools/command/saveopts.py -> build/lib/setuptools/command copying setuptools/command/easy_install.py -> build/lib/setuptools/command copying setuptools/command/build_ext.py -> build/lib/setuptools/command copying setuptools/command/egg_info.py -> build/lib/setuptools/command copying setuptools/command/install_lib.py -> build/lib/setuptools/command copying setuptools/command/develop.py -> build/lib/setuptools/command copying setuptools/command/alias.py -> build/lib/setuptools/command copying setuptools/command/sdist.py -> build/lib/setuptools/command copying setuptools/command/bdist_egg.py -> build/lib/setuptools/command copying setuptools/command/bdist_rpm.py -> build/lib/setuptools/command copying setuptools/command/rotate.py -> build/lib/setuptools/command copying setuptools/command/build_py.py -> build/lib/setuptools/command copying setuptools/command/upload.py -> build/lib/setuptools/command copying setuptools/command/setopt.py -> build/lib/setuptools/command copying setuptools/command/__init__.py -> build/lib/setuptools/command copying setuptools/command/install.py -> build/lib/setuptools/command creating build/bdist.linux-x86_64 creating build/bdist.linux-x86_64/egg copying build/lib/pkg_resources.py -> build/bdist.linux-x86_64/egg copying build/lib/easy_install.py -> build/bdist.linux-x86_64/egg creating build/bdist.linux-x86_64/egg/setuptools copying build/lib/setuptools/depends.py -> build/bdist.linux-x86_64/egg/setuptools creating build/bdist.linux-x86_64/egg/setuptools/tests copying build/lib/setuptools/tests/doctest.py -> build/bdist.linux-x86_64/egg/setuptools/tests copying build/lib/setuptools/tests/__init__.py -> build/bdist.linux-x86_64/egg/setuptools/tests copying build/lib/setuptools/tests/test_resources.py -> build/bdist.linux-x86_64/egg/setuptools/tests copying build/lib/setuptools/archive_util.py -> build/bdist.linux-x86_64/egg/setuptools copying build/lib/setuptools/dist.py -> build/bdist.linux-x86_64/egg/setuptools copying build/lib/setuptools/__init__.py -> build/bdist.linux-x86_64/egg/setuptools copying build/lib/setuptools/extension.py -> build/bdist.linux-x86_64/egg/setuptools copying build/lib/setuptools/sandbox.py -> build/bdist.linux-x86_64/egg/setuptools creating build/bdist.linux-x86_64/egg/setuptools/command copying build/lib/setuptools/command/test.py -> build/bdist.linux-x86_64/egg/setuptools/command copying build/lib/setuptools/command/saveopts.py -> build/bdist.linux-x86_64/egg/setuptools/command copying build/lib/setuptools/command/easy_install.py -> build/bdist.linux-x86_64/egg/setuptools/command copying build/lib/setuptools/command/build_ext.py -> build/bdist.linux-x86_64/egg/setuptools/command copying build/lib/setuptools/command/egg_info.py -> build/bdist.linux-x86_64/egg/setuptools/command copying build/lib/setuptools/command/install_lib.py -> build/bdist.linux-x86_64/egg/setuptools/command copying build/lib/setuptools/command/develop.py -> build/bdist.linux-x86_64/egg/setuptools/command copying build/lib/setuptools/command/alias.py -> build/bdist.linux-x86_64/egg/setuptools/command copying build/lib/setuptools/command/sdist.py -> build/bdist.linux-x86_64/egg/setuptools/command copying build/lib/setuptools/command/bdist_egg.py -> build/bdist.linux-x86_64/egg/setuptools/command copying build/lib/setuptools/command/bdist_rpm.py -> build/bdist.linux-x86_64/egg/setuptools/command copying build/lib/setuptools/command/rotate.py -> build/bdist.linux-x86_64/egg/setuptools/command copying build/lib/setuptools/command/build_py.py -> build/bdist.linux-x86_64/egg/setuptools/command copying build/lib/setuptools/command/upload.py -> build/bdist.linux-x86_64/egg/setuptools/command copying build/lib/setuptools/command/setopt.py -> build/bdist.linux-x86_64/egg/setuptools/command copying build/lib/setuptools/command/__init__.py -> build/bdist.linux-x86_64/egg/setuptools/command copying build/lib/setuptools/command/install.py -> build/bdist.linux-x86_64/egg/setuptools/command copying build/lib/setuptools/package_index.py -> build/bdist.linux-x86_64/egg/setuptools byte-compiling build/bdist.linux-x86_64/egg/pkg_resources.py to pkg_resources.pyc byte-compiling build/bdist.linux-x86_64/egg/easy_install.py to easy_install.pyc byte-compiling build/bdist.linux-x86_64/egg/setuptools/depends.py to depends.pyc byte-compiling build/bdist.linux-x86_64/egg/setuptools/tests/doctest.py to doctest.pyc byte-compiling build/bdist.linux-x86_64/egg/setuptools/tests/__init__.py to __init__.pyc byte-compiling build/bdist.linux-x86_64/egg/setuptools/tests/test_resources.py to test_resources.pyc byte-compiling build/bdist.linux-x86_64/egg/setuptools/archive_util.py to archive_util.pyc byte-compiling build/bdist.linux-x86_64/egg/setuptools/dist.py to dist.pyc byte-compiling build/bdist.linux-x86_64/egg/setuptools/__init__.py to __init__.pyc byte-compiling build/bdist.linux-x86_64/egg/setuptools/extension.py to extension.pyc byte-compiling build/bdist.linux-x86_64/egg/setuptools/sandbox.py to sandbox.pyc byte-compiling build/bdist.linux-x86_64/egg/setuptools/command/test.py to test.pyc byte-compiling build/bdist.linux-x86_64/egg/setuptools/command/saveopts.py to saveopts.pyc byte-compiling build/bdist.linux-x86_64/egg/setuptools/command/easy_install.py to easy_install.pyc byte-compiling build/bdist.linux-x86_64/egg/setuptools/command/build_ext.py to build_ext.pyc byte-compiling build/bdist.linux-x86_64/egg/setuptools/command/egg_info.py to egg_info.pyc byte-compiling build/bdist.linux-x86_64/egg/setuptools/command/install_lib.py to install_lib.pyc byte-compiling build/bdist.linux-x86_64/egg/setuptools/command/develop.py to develop.pyc byte-compiling build/bdist.linux-x86_64/egg/setuptools/command/alias.py to alias.pyc byte-compiling build/bdist.linux-x86_64/egg/setuptools/command/sdist.py to sdist.pyc byte-compiling build/bdist.linux-x86_64/egg/setuptools/command/bdist_egg.py to bdist_egg.pyc byte-compiling build/bdist.linux-x86_64/egg/setuptools/command/bdist_rpm.py to bdist_rpm.pyc byte-compiling build/bdist.linux-x86_64/egg/setuptools/command/rotate.py to rotate.pyc byte-compiling build/bdist.linux-x86_64/egg/setuptools/command/build_py.py to build_py.pyc byte-compiling build/bdist.linux-x86_64/egg/setuptools/command/upload.py to upload.pyc byte-compiling build/bdist.linux-x86_64/egg/setuptools/command/setopt.py to setopt.pyc byte-compiling build/bdist.linux-x86_64/egg/setuptools/command/__init__.py to __init__.pyc byte-compiling build/bdist.linux-x86_64/egg/setuptools/command/install.py to install.pyc byte-compiling build/bdist.linux-x86_64/egg/setuptools/package_index.py to package_index.pyc creating build/bdist.linux-x86_64/egg/EGG-INFO installing scripts to build/bdist.linux-x86_64/egg/EGG-INFO/scripts running install_scripts running build_scripts creating build/scripts-2.3 copying and adjusting easy_install.py -> build/scripts-2.3 changing mode of build/scripts-2.3/easy_install.py from 644 to 755 creating build/bdist.linux-x86_64/egg/EGG-INFO/scripts copying build/scripts-2.3/easy_install.py -> build/bdist.linux-x86_64/egg/EGG-INFO/scripts changing mode of build/bdist.linux-x86_64/egg/EGG-INFO/scripts/easy_install.py to 755 copying ./setuptools.egg-info/entry_points.txt -> build/bdist.linux-x86_64/egg/EGG-INFO copying ./setuptools.egg-info/top_level.txt -> build/bdist.linux-x86_64/egg/EGG-INFO copying ./setuptools.egg-info/PKG-INFO -> build/bdist.linux-x86_64/egg/EGG-INFO creating dist creating 'dist/setuptools-0.6a4-py2.3.egg' and adding 'build/bdist.linux-x86_64/egg' to it removing 'build/bdist.linux-x86_64/egg' (and everything under it) Processing setuptools-0.6a4-py2.3.egg Traceback (most recent call last): File "setup.py", line 81, in ? scripts = scripts, File "/usr/lib64/python2.3/distutils/core.py", line 149, in setup dist.run_commands() File "/usr/lib64/python2.3/distutils/dist.py", line 907, in run_commands self.run_command(cmd) File "/usr/lib64/python2.3/distutils/dist.py", line 927, in run_command cmd_obj.run() File "/root/svn-install-apps/setuptools-0.6a4/setuptools/command/install.py", line 50, in run cmd.run() File "/root/svn-install-apps/setuptools-0.6a4/setuptools/command/easy_install.py", line 225, in run self.easy_install(spec, True) File "/root/svn-install-apps/setuptools-0.6a4/setuptools/command/easy_install.py", line 303, in easy_install return self.install_item(None, spec, tmpdir, deps, True) File "/root/svn-install-apps/setuptools-0.6a4/setuptools/command/easy_install.py", line 338, in install_item dists = self.install_eggs(spec, download, tmpdir) File "/root/svn-install-apps/setuptools-0.6a4/setuptools/command/easy_install.py", line 537, in install_eggs return [self.install_egg(dist_filename, tmpdir)] File "/root/svn-install-apps/setuptools-0.6a4/setuptools/command/easy_install.py", line 589, in install_egg self.check_conflicts(dist) File "/root/svn-install-apps/setuptools-0.6a4/setuptools/command/easy_install.py", line 711, in check_conflicts names = dict.fromkeys(dist._get_metadata('top_level.txt')) # XXX private attr File "/root/svn-install-apps/setuptools-0.6a4/pkg_resources.py", line 1834, in _get_metadata for line in self.get_metadata_lines(name): File "/root/svn-install-apps/setuptools-0.6a4/pkg_resources.py", line 894, in get_metadata_lines return yield_lines(self.get_metadata(name)) File "/root/svn-install-apps/setuptools-0.6a4/pkg_resources.py", line 891, in get_metadata return self._get(self._fn(self.egg_info,name)) File "/root/svn-install-apps/setuptools-0.6a4/pkg_resources.py", line 949, in _get return self.loader.get_data(path) OverflowError: signed integer is greater than maximum Thanks Viren -- Viren R Shah Sr. Technical Advisor Virtual Technology Corporation vshah@virtc.com P: 703-333-6246
At 12:14 PM 9/29/2005 -0400, Viren Shah wrote:
File "/root/svn-install-apps/setuptools-0.6a4/pkg_resources.py", line 949, in _get return self.loader.get_data(path) OverflowError: signed integer is greater than maximum
Interesting. That looks like it might be a bug in the Python zipimport module, which is what implements get_data(). Apparently it happens upon importing as well; I assumed that it was a bytecode incompatibility. Checking the revision log, I find that there's a 64-bit fix for zipimport.c in Python 2.4 that looks like it would fix this issue, but it has not been backported to any revision of Python 2.3. You're going to either have to backport the fix yourself and rebuild Python 2.3, or upgrade to Python 2.4. Sorry. :( The diff that implements the fix is at: http://cvs.sourceforge.net/viewcvs.py/python/python/dist/src/Modules/zipimport.c?r1=1.16&r2=1.17 I'll update my documentation pages to reflect that setuptools requires Python 2.4 if you're using a 64-bit Python.
Phillip J. Eby wrote:
At 12:14 PM 9/29/2005 -0400, Viren Shah wrote:
File "/root/svn-install-apps/setuptools-0.6a4/pkg_resources.py", line 949, in _get return self.loader.get_data(path) OverflowError: signed integer is greater than maximum
Interesting. That looks like it might be a bug in the Python zipimport module, which is what implements get_data(). Apparently it happens upon importing as well; I assumed that it was a bytecode incompatibility.
Checking the revision log, I find that there's a 64-bit fix for zipimport.c in Python 2.4 that looks like it would fix this issue, but it has not been backported to any revision of Python 2.3. You're going to either have to backport the fix yourself and rebuild Python 2.3, or upgrade to Python 2.4. Sorry. :(
Cool! Thanks for the solution. I'll upgrade to python 2.4 and hope it works :-) Thanks for all your help Viren -- Viren R Shah Sr. Technical Advisor Virtual Technology Corporation vshah@virtc.com P: 703-333-6246
participants (2)
-
Phillip J. Eby -
Viren Shah