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


J

Jason Mellone

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.
 
Ad

Advertisements

J

Jurko Gospodnetić

Hi.

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ć
 
J

Jason Mellone

Hi.



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

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?
 
Ad

Advertisements

J

Jurko Gospodnetić

Hi Jason,

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top