Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #71015 > unrolled thread

Common issue but unable to find common solution (ez_setup.py on PC)

Started byJason Mellone <jason.mellone@gmail.com>
First post2014-05-07 04:55 -0700
Last post2014-05-07 18:58 +0200
Articles 4 — 2 participants

Back to article view | Back to comp.lang.python


Contents

  Common issue but unable to find common solution (ez_setup.py on PC) Jason Mellone <jason.mellone@gmail.com> - 2014-05-07 04:55 -0700
    Re: Common issue but unable to find common solution (ez_setup.py on PC) Jurko Gospodnetić <jurko.gospodnetic@pke.hr> - 2014-05-07 15:44 +0200
      Re: Common issue but unable to find common solution (ez_setup.py on PC) Jason Mellone <jason.mellone@gmail.com> - 2014-05-07 06:52 -0700
        Re: Common issue but unable to find common solution (ez_setup.py on PC) Jurko Gospodnetić <jurko.gospodnetic@pke.hr> - 2014-05-07 18:58 +0200

#71015 — Common issue but unable to find common solution (ez_setup.py on PC)

FromJason Mellone <jason.mellone@gmail.com>
Date2014-05-07 04:55 -0700
SubjectCommon issue but unable to find common solution (ez_setup.py on PC)
Message-ID<253cc793-655e-4b7d-a167-73bb8bebde90@googlegroups.com>
Hello,

By way of google I realize I am having what appears to be a pretty common issue install ez_setup.py on a PC (Windows XP, Python27). 

I receive an error message that looks like the following:

Installing easy_install-2.7.exe.manifest script to C:\Python27\Scripts

 Installed c:\python27\lib\site-packages\setuptools-3.5.1-py2.7.egg
 Processing dependencies for setuptools==3.5.1
 Traceback (most recent call last):
   File "setup.py", line 217, in <module>
     dist = setuptools.setup(**setup_params)
   File "C:\Python27\lib\distutils\core.py", line 152, in setup
     dist.run_commands()
   File "C:\Python27\lib\distutils\dist.py", line 953, in run_commands
     self.run_command(cmd)
   File "C:\Python27\lib\distutils\dist.py", line 972, in run_command
     cmd_obj.run()
   File "c:\docume~1\jason\locals~1\temp\tmpqpn4qe\setuptools-3.5.1\setuptools\co
 mmand\install.py", line 65, in run
     self.do_egg_install()
   File "c:\docume~1\jason\locals~1\temp\tmpqpn4qe\setuptools-3.5.1\setuptools\co
 mmand\install.py", line 115, in do_egg_install
     cmd.run()
   File "c:\docume~1\jason\locals~1\temp\tmpqpn4qe\setuptools-3.5.1\setuptools\co
 mmand\easy_install.py", line 360, in run
     self.easy_install(spec, not self.no_deps)
   File "c:\docume~1\jason\locals~1\temp\tmpqpn4qe\setuptools-3.5.1\setuptools\co
 mmand\easy_install.py", line 576, in easy_install
     return self.install_item(None, spec, tmpdir, deps, True)
   File "c:\docume~1\jason\locals~1\temp\tmpqpn4qe\setuptools-3.5.1\setuptools\co
 mmand\easy_install.py", line 627, in install_item
     self.process_distribution(spec, dist, deps)
   File "c:\docume~1\jason\locals~1\temp\tmpqpn4qe\setuptools-3.5.1\setuptools\co
 mmand\easy_install.py", line 673, in process_distribution
     [requirement], self.local_index, self.easy_install
   File "c:\docume~1\jason\locals~1\temp\tmpqpn4qe\setuptools-3.5.1\pkg_resources
 .py", line 633, in resolve
     requirements.extend(dist.requires(req.extras)[::-1])
   File "c:\docume~1\jason\locals~1\temp\tmpqpn4qe\setuptools-3.5.1\pkg_resources
 .py", line 2291, in requires
     dm = self._dep_map
   File "c:\docume~1\jason\locals~1\temp\tmpqpn4qe\setuptools-3.5.1\pkg_resources
 .py", line 2277, in _dep_map
     for extra, reqs in split_sections(self._get_metadata(name)):
   File "c:\docume~1\jason\locals~1\temp\tmpqpn4qe\setuptools-3.5.1\pkg_resources
 .py", line 2715, in split_sections
     for line in yield_lines(s):
   File "c:\docume~1\jason\locals~1\temp\tmpqpn4qe\setuptools-3.5.1\pkg_resources
 .py", line 1989, in yield_lines
     for ss in strs:
   File "c:\docume~1\jason\locals~1\temp\tmpqpn4qe\setuptools-3.5.1\pkg_resources
 .py", line 2305, in _get_metadata
     for line in self.get_metadata_lines(name):
   File "c:\docume~1\jason\locals~1\temp\tmpqpn4qe\setuptools-3.5.1\pkg_resources
 .py", line 1369, in get_metadata_lines
     return yield_lines(self.get_metadata(name))
   File "c:\docume~1\jason\locals~1\temp\tmpqpn4qe\setuptools-3.5.1\pkg_resources
 .py", line 1361, in get_metadata
     return self._get(self._fn(self.egg_info, name))
   File "c:\docume~1\jason\locals~1\temp\tmpqpn4qe\setuptools-3.5.1\pkg_resources
 .py", line 1425, in _get
     return self.loader.get_data(path)
 zipimport.ZipImportError: bad local file header in c:\python27\lib\site-packages
 \setuptools-3.5.1-py2.7.egg
 Something went wrong during the installation.
 See the error message above.

 C:\Python27>python ez_setup.py 


Is there a common solution for this issue?

Thank you very much.

[toc] | [next] | [standalone]


#71018

FromJurko Gospodnetić <jurko.gospodnetic@pke.hr>
Date2014-05-07 15:44 +0200
Message-ID<mailman.9732.1399470270.18130.python-list@python.org>
In reply to#71015
   Hi.

On 7.5.2014. 13:55, Jason Mellone wrote:
> By way of google I realize I am having what appears to be
> a pretty common issue install ez_setup.py on a PC (Windows XP, Python27).
>
> I receive an error message that looks like the following:
>
> Installing easy_install-2.7.exe.manifest script to C:\Python27\Scripts
>
>[...snipped a long traceback...]
>       return self.loader.get_data(path)
>   zipimport.ZipImportError: bad local file header in c:\python27\lib\site-packages
>   \setuptools-3.5.1-py2.7.egg
>   Something went wrong during the installation.
>   See the error message above.

   You can run into this when attempting to upgrade an existing 
setuptools installation packaged as a zipped egg (due to some old 
zipimporter caches not getting cleaned up correctly).


> Is there a common solution for this issue?

   It has already been reported and a patch has been prepared. See the 
following:

   https://bitbucket.org/pypa/setuptools/issue/168
   https://bitbucket.org/pypa/setuptools/pull-request/48

   But the patch is still waiting on the maintainer to apply it.


   Hope this helps.

   Best regards,
     Jurko Gospodnetić

[toc] | [prev] | [next] | [standalone]


#71020

FromJason Mellone <jason.mellone@gmail.com>
Date2014-05-07 06:52 -0700
Message-ID<50b03208-8a61-43fc-890e-09992c4c4759@googlegroups.com>
In reply to#71018
On Wednesday, May 7, 2014 9:44:14 AM UTC-4, Jurko Gospodnetić wrote:
> Hi.
> 
> 
> 
> On 7.5.2014. 13:55, Jason Mellone wrote:
> 
> > By way of google I realize I am having what appears to be
> 
> > a pretty common issue install ez_setup.py on a PC (Windows XP, Python27).
> 
> >
> 
> > I receive an error message that looks like the following:
> 
> >
> 
> > Installing easy_install-2.7.exe.manifest script to C:\Python27\Scripts
> 
> >
> 
> >[...snipped a long traceback...]
> 
> >       return self.loader.get_data(path)
> 
> >   zipimport.ZipImportError: bad local file header in c:\python27\lib\site-packages
> 
> >   \setuptools-3.5.1-py2.7.egg
> 
> >   Something went wrong during the installation.
> 
> >   See the error message above.
> 
> 
> 
>    You can run into this when attempting to upgrade an existing 
> 
> setuptools installation packaged as a zipped egg (due to some old 
> 
> zipimporter caches not getting cleaned up correctly).
> 
> 
> 
> 
> 
> > Is there a common solution for this issue?
> 
> 
> 
>    It has already been reported and a patch has been prepared. See the 
> 
> following:
> 
> 
> 
>    https://bitbucket.org/pypa/setuptools/issue/168
> 
>    https://bitbucket.org/pypa/setuptools/pull-request/48
> 
> 
> 
>    But the patch is still waiting on the maintainer to apply it.
> 
> 
> 
> 
> 
>    Hope this helps.
> 
> 
> 
>    Best regards,
> 
>      Jurko Gospodnetić

So, is the answer:

1 - Until the patch is applied there is no answer

or 

2 - I can go in and manually modify the code, and have the ez setup work?

[toc] | [prev] | [next] | [standalone]


#71038

FromJurko Gospodnetić <jurko.gospodnetic@pke.hr>
Date2014-05-07 18:58 +0200
Message-ID<mailman.9744.1399481949.18130.python-list@python.org>
In reply to#71020
   Hi Jason,

On 7.5.2014. 15:52, Jason Mellone wrote:
> So, is the answer:
>
> 1 - Until the patch is applied there is no answer
>
> or
>
> 2 - I can go in and manually modify the code, and have the ez setup work?

   I see the patch has just been applied to the setuptools development 
repo, so the bug will be fixed in the next setuptools release, which 
seems imminent, judging from the latest setuptools commits. Related 
commits (see them at https://bitbucket.org/pypa/setuptools/commits/all) 
are on a branch containing the c95540cfeaec64251e78add403513a4f30700319 
commit from 2014-04-15.

   But, if you need to fix your problem sooner, you can always do one of 
the following:

   1. Not run ez_setup.py if setuptools is already installed and instead 
just run 'easy_install -U setuptools' to perform the upgrade. (I think 
that avoids the problem at hand, but I don't recall all the details so I 
could be mistaken.)
   2. Manually remove setuptools before running ez_setup.py (either by 
removing the setuptools egg from your site-packages folder or perhaps by 
running 'pip uninstall setuptools').
   3. Checkout the development version of setuptools and install from 
there or prepare your own private setuptools package based on the 
current development tip.

   So you should be able to get your scenario to work, whatever it is.

   Hope this helps.

   Best regards,
     Jurko Gospodnetić

P.S.
   I guess you're using google groups. I really hate the double spacing 
that leaves in your quotes and thus makes me scroll a lot and waste a 
lot of time trying to parse your message. Please try to use a different 
newsgroup client, e.g. Thunderbird. Many thanks.

[toc] | [prev] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web