zlib OverflowError: 'size does not fit in an int'

Chris Angelico rosuav at gmail.com
Mon Dec 4 19:15:39 EST 2017


On Tue, Dec 5, 2017 at 10:46 AM, Larry Martell <larry.martell at gmail.com> wrote:
> Trying to zip a large file is failing with OverflowError: 'size does
> not fit in an int'. Googling I found this:
>
> https://bugs.python.org/issue23306
>
> and this:
>
> https://hg.python.org/cpython/rev/2192edcfea02
>
> which seems to make me think this was fixed this was fixed on Jul 23 2016.
>
> I am running CentOS 7 and I have python version:
>
> Python 2.7.5 (default, Sep 15 2016, 22:37:39)
>
> Which I guess does not have this fix. How can I get a version with
> that fix (that doesn't break CentOS)

First thing I'd consider is a Python 3.x version. Is there one in your
CentOS repositories? If not, worst case, you can compile one from
source or get one from some other repo, and it can't possibly break
your system because it won't mess with anything you're using.

If you absolutely HAVE to stick with 2.7, you may do well to compile
from source and NOT install - just run the binary from the source
directory.

ChrisA



More information about the Python-list mailing list