[Distutils] [distribute] distribute_setup.py fails on Linux

Tarek Ziadé ziade.tarek at gmail.com
Thu Feb 3 13:52:02 CET 2011


On Thu, Feb 3, 2011 at 1:47 PM, Arve Knudsen <arve.knudsen at gmail.com> wrote:
> Hi Tarek
> Nevermind, there was a problem with the Python installation so that it
> didn't support zlib. Reinstalling Python fixed it :) Sorry for bothering
> you. It might be an idea to embellish distribute_setup.py though, so that it
> detects that Python can't untar the gzipped archive (due to missing zlib
> support). That would've saved us some confusion at least :)
> Arve

Oh.. mmm I think this should even be addressed in tarfile if possible:
if tarfile encounters a zipped archive, and zlib is not installed, it
should not return a cryptic

tarfile.ReadError: file could not be opened successfully

But an error like

tarfile.ReadError: archive not supported (zlib not installed)

And well, searching for this error in bugs.python.org, it looks like
it will be addressed soon: http://bugs.python.org/issue8978





>
> On Thu, Feb 3, 2011 at 1:30 PM, Tarek Ziadé <ziade.tarek at gmail.com> wrote:
>>
>> On Thu, Feb 3, 2011 at 1:20 PM, Arve Knudsen <arve.knudsen at gmail.com>
>> wrote:
>> > Hello
>> > I have a rather serious problem with distribute 0.6.14, in that it won't
>> > install for me under Python 2.7 on Linux (RHEL 4u6). What happens is
>> > this:
>> > -bash-3.00$ python distribute_setup.py
>> > Extracting in /tmp/tmphDMO8m
>> > Traceback (most recent call last):
>> >   File "distribute_setup.py", line 485, in <module>
>> >     main(sys.argv[1:])
>> >   File "distribute_setup.py", line 481, in main
>> >     _install(tarball)
>> >   File "distribute_setup.py", line 73, in _install
>> >     tar = tarfile.open(tarball)
>> >   File "/usr/local/lib/python2.7/tarfile.py", line 1663, in open
>> >     raise ReadError("file could not be opened successfully")
>> > tarfile.ReadError: file could not be opened successfully
>>
>> Weird, works for me:
>>
>> arek at tarek-laptop:/tmp$ wget
>> http://python-distribute.org/distribute_setup.py
>> --2011-02-03 13:27:33--  http://python-distribute.org/distribute_setup.py
>> Resolving python-distribute.org... 88.191.66.185
>> Connecting to python-distribute.org|88.191.66.185|:80... connected.
>> HTTP request sent, awaiting response... 200 OK
>> Length: 15757 (15K) [text/x-python]
>> Saving to: `distribute_setup.py'
>>
>>
>> 100%[===================================================================================>]
>> 15,757      18.9K/s   in 0.8s
>>
>> 2011-02-03 13:27:39 (18.9 KB/s) - `distribute_setup.py' saved
>> [15757/15757]
>>
>> tarek at tarek-laptop:/tmp$ sudo python2.7 distribute_setup.py
>> [sudo] password for tarek:
>> Downloading
>> http://pypi.python.org/packages/source/d/distribute/distribute-0.6.14.tar.gz
>> Extracting in /tmp/tmpw5VpwH
>> Now working in /tmp/tmpw5VpwH/distribute-0.6.14
>> Installing Distribute
>> ...some install output..
>>
>>
>> >
>> > Is the official distribute 0.6.14 archive bad?
>>
>> No. Can you try to download it and unpack it manually from
>>
>> http://pypi.python.org/packages/source/d/distribute/distribute-0.6.14.tar.gz
>> ?
>>
>> Maybe there's an permission issue somehow when you call the script.
>>
>>
>> > Arve
>> > _______________________________________________
>> > Distutils-SIG maillist  -  Distutils-SIG at python.org
>> > http://mail.python.org/mailman/listinfo/distutils-sig
>> >
>> >
>>
>>
>>
>> --
>> Tarek Ziadé | http://ziade.org
>
>



-- 
Tarek Ziadé | http://ziade.org


More information about the Distutils-SIG mailing list