Windows XP上的python ez_setup

时间:2014-05-07 02:02:38

标签: python python-2.7

尝试在windows xp上安装ez_setup.py。安装了Python2.7,并建立了正确的路径变量。

我尝试关注this,但收到以下错误:

 copying build\lib\setuptools\command\bdist_rpm.py -> build\bdist.win32\egg\setup
 tools\command
 copying build\lib\setuptools\command\bdist_wininst.py -> build\bdist.win32\egg\s
 etuptools\command
 copying build\lib\setuptools\command\build_ext.py -> build\bdist.win32\egg\setup
 tools\command
 copying build\lib\setuptools\command\build_py.py -> build\bdist.win32\egg\setupt
 ools\command
 copying build\lib\setuptools\command\develop.py -> build\bdist.win32\egg\setupto
 ols\command
 copying build\lib\setuptools\command\easy_install.py -> build\bdist.win32\egg\se
 tuptools\command
 copying build\lib\setuptools\command\egg_info.py -> build\bdist.win32\egg\setupt
 ools\command
 copying build\lib\setuptools\command\install.py -> build\bdist.win32\egg\setupto
 ols\command
 copying build\lib\setuptools\command\install_egg_info.py -> build\bdist.win32\eg
 g\setuptools\command
 copying build\lib\setuptools\command\install_lib.py -> build\bdist.win32\egg\set
 uptools\command
 copying build\lib\setuptools\command\install_scripts.py -> build\bdist.win32\egg
 \setuptools\command
 copying build\lib\setuptools\command\launcher manifest.xml -> build\bdist.win32\
 egg\setuptools\command
 copying build\lib\setuptools\command\register.py -> build\bdist.win32\egg\setupt
 ools\command
 copying build\lib\setuptools\command\rotate.py -> build\bdist.win32\egg\setuptoo
 ls\command
 copying build\lib\setuptools\command\saveopts.py -> build\bdist.win32\egg\setupt
 ools\command
 copying build\lib\setuptools\command\sdist.py -> build\bdist.win32\egg\setuptool
 s\command
 copying build\lib\setuptools\command\setopt.py -> build\bdist.win32\egg\setuptoo
 ls\command
 copying build\lib\setuptools\command\test.py -> build\bdist.win32\egg\setuptools
 \command
 copying build\lib\setuptools\command\upload_docs.py -> build\bdist.win32\egg\set
 uptools\command
 copying build\lib\setuptools\command\__init__.py -> build\bdist.win32\egg\setupt
 ools\command
 copying build\lib\setuptools\compat.py -> build\bdist.win32\egg\setuptools
 copying build\lib\setuptools\depends.py -> build\bdist.win32\egg\setuptools
 copying build\lib\setuptools\dist.py -> build\bdist.win32\egg\setuptools
 copying build\lib\setuptools\extension.py -> build\bdist.win32\egg\setuptools
 copying build\lib\setuptools\gui-32.exe -> build\bdist.win32\egg\setuptools
 copying build\lib\setuptools\gui-64.exe -> build\bdist.win32\egg\setuptools
 copying build\lib\setuptools\gui-arm-32.exe -> build\bdist.win32\egg\setuptools
 copying build\lib\setuptools\gui.exe -> build\bdist.win32\egg\setuptools
 copying build\lib\setuptools\lib2to3_ex.py -> build\bdist.win32\egg\setuptools
 copying build\lib\setuptools\package_index.py -> build\bdist.win32\egg\setuptool
 s
 copying build\lib\setuptools\py26compat.py -> build\bdist.win32\egg\setuptools
 copying build\lib\setuptools\py27compat.py -> build\bdist.win32\egg\setuptools
 copying build\lib\setuptools\py31compat.py -> build\bdist.win32\egg\setuptools
 copying build\lib\setuptools\sandbox.py -> build\bdist.win32\egg\setuptools
 copying build\lib\setuptools\script template (dev).py -> build\bdist.win32\egg\s
 etuptools
 copying build\lib\setuptools\script template.py -> build\bdist.win32\egg\setupto
 ols
 copying build\lib\setuptools\site-patch.py -> build\bdist.win32\egg\setuptools
 copying build\lib\setuptools\ssl_support.py -> build\bdist.win32\egg\setuptools
 copying build\lib\setuptools\svn_utils.py -> build\bdist.win32\egg\setuptools
 creating build\bdist.win32\egg\setuptools\tests
 copying build\lib\setuptools\tests\doctest.py -> build\bdist.win32\egg\setuptool
 s\tests
 copying build\lib\setuptools\tests\environment.py -> build\bdist.win32\egg\setup
 tools\tests
 copying build\lib\setuptools\tests\py26compat.py -> build\bdist.win32\egg\setupt
 ools\tests
 copying build\lib\setuptools\tests\script-with-bom.py -> build\bdist.win32\egg\s
 etuptools\tests
 copying build\lib\setuptools\tests\server.py -> build\bdist.win32\egg\setuptools
 \tests
 copying build\lib\setuptools\tests\test_bdist_egg.py -> build\bdist.win32\egg\se
 tuptools\tests
 copying build\lib\setuptools\tests\test_build_ext.py -> build\bdist.win32\egg\se
 tuptools\tests
 copying build\lib\setuptools\tests\test_develop.py -> build\bdist.win32\egg\setu
 ptools\tests
 copying build\lib\setuptools\tests\test_dist_info.py -> build\bdist.win32\egg\se
 tuptools\tests
 copying build\lib\setuptools\tests\test_easy_install.py -> build\bdist.win32\egg
 \setuptools\tests
 copying build\lib\setuptools\tests\test_egg_info.py -> build\bdist.win32\egg\set
 uptools\tests
 copying build\lib\setuptools\tests\test_find_packages.py -> build\bdist.win32\eg
 g\setuptools\tests
 copying build\lib\setuptools\tests\test_markerlib.py -> build\bdist.win32\egg\se
 tuptools\tests
 copying build\lib\setuptools\tests\test_packageindex.py -> build\bdist.win32\egg
 \setuptools\tests
 copying build\lib\setuptools\tests\test_resources.py -> build\bdist.win32\egg\se
 tuptools\tests
 copying build\lib\setuptools\tests\test_sandbox.py -> build\bdist.win32\egg\setu
 ptools\tests
 copying build\lib\setuptools\tests\test_sdist.py -> build\bdist.win32\egg\setupt
 ools\tests
 copying build\lib\setuptools\tests\test_svn.py -> build\bdist.win32\egg\setuptoo
 ls\tests
 copying build\lib\setuptools\tests\test_test.py -> build\bdist.win32\egg\setupto
 ols\tests
 copying build\lib\setuptools\tests\test_upload_docs.py -> build\bdist.win32\egg\
 setuptools\tests
 copying build\lib\setuptools\tests\__init__.py -> build\bdist.win32\egg\setuptoo
 ls\tests
 copying build\lib\setuptools\version.py -> build\bdist.win32\egg\setuptools
 copying build\lib\setuptools\__init__.py -> build\bdist.win32\egg\setuptools
 creating build\bdist.win32\egg\_markerlib
 copying build\lib\_markerlib\markers.py -> build\bdist.win32\egg\_markerlib
 copying build\lib\_markerlib\__init__.py -> build\bdist.win32\egg\_markerlib
 byte-compiling build\bdist.win32\egg\easy_install.py to easy_install.pyc
 byte-compiling build\bdist.win32\egg\pkg_resources.py to pkg_resources.pyc
 byte-compiling build\bdist.win32\egg\setuptools\archive_util.py to archive_util.
 pyc
 byte-compiling build\bdist.win32\egg\setuptools\command\alias.py to alias.pyc
 byte-compiling build\bdist.win32\egg\setuptools\command\bdist_egg.py to bdist_eg
 g.pyc
 byte-compiling build\bdist.win32\egg\setuptools\command\bdist_rpm.py to bdist_rp
 m.pyc
 byte-compiling build\bdist.win32\egg\setuptools\command\bdist_wininst.py to bdis
 t_wininst.pyc
 byte-compiling build\bdist.win32\egg\setuptools\command\build_ext.py to build_ex
 t.pyc
 byte-compiling build\bdist.win32\egg\setuptools\command\build_py.py to build_py.
 pyc
 byte-compiling build\bdist.win32\egg\setuptools\command\develop.py to develop.py
 c
 byte-compiling build\bdist.win32\egg\setuptools\command\easy_install.py to easy_
 install.pyc
 byte-compiling build\bdist.win32\egg\setuptools\command\egg_info.py to egg_info.
 pyc
 byte-compiling build\bdist.win32\egg\setuptools\command\install.py to install.py
 c
 byte-compiling build\bdist.win32\egg\setuptools\command\install_egg_info.py to i
 nstall_egg_info.pyc
 byte-compiling build\bdist.win32\egg\setuptools\command\install_lib.py to instal
 l_lib.pyc
 byte-compiling build\bdist.win32\egg\setuptools\command\install_scripts.py to in
 stall_scripts.pyc
 byte-compiling build\bdist.win32\egg\setuptools\command\register.py to register.
 pyc
 byte-compiling build\bdist.win32\egg\setuptools\command\rotate.py to rotate.pyc
 byte-compiling build\bdist.win32\egg\setuptools\command\saveopts.py to saveopts.
 pyc
 byte-compiling build\bdist.win32\egg\setuptools\command\sdist.py to sdist.pyc
 byte-compiling build\bdist.win32\egg\setuptools\command\setopt.py to setopt.pyc
 byte-compiling build\bdist.win32\egg\setuptools\command\test.py to test.pyc
 byte-compiling build\bdist.win32\egg\setuptools\command\upload_docs.py to upload
 _docs.pyc
 byte-compiling build\bdist.win32\egg\setuptools\command\__init__.py to __init__.
 pyc
 byte-compiling build\bdist.win32\egg\setuptools\compat.py to compat.pyc
 byte-compiling build\bdist.win32\egg\setuptools\depends.py to depends.pyc
 byte-compiling build\bdist.win32\egg\setuptools\dist.py to dist.pyc
 byte-compiling build\bdist.win32\egg\setuptools\extension.py to extension.pyc
 byte-compiling build\bdist.win32\egg\setuptools\lib2to3_ex.py to lib2to3_ex.pyc
 byte-compiling build\bdist.win32\egg\setuptools\package_index.py to package_inde
 x.pyc
 byte-compiling build\bdist.win32\egg\setuptools\py26compat.py to py26compat.pyc
 byte-compiling build\bdist.win32\egg\setuptools\py27compat.py to py27compat.pyc
 byte-compiling build\bdist.win32\egg\setuptools\py31compat.py to py31compat.pyc
 byte-compiling build\bdist.win32\egg\setuptools\sandbox.py to sandbox.pyc
 byte-compiling build\bdist.win32\egg\setuptools\script template (dev).py to scri
 pt template (dev).pyc
 byte-compiling build\bdist.win32\egg\setuptools\script template.py to script tem
 plate.pyc
 byte-compiling build\bdist.win32\egg\setuptools\site-patch.py to site-patch.pyc
 byte-compiling build\bdist.win32\egg\setuptools\ssl_support.py to ssl_support.py
 c
 byte-compiling build\bdist.win32\egg\setuptools\svn_utils.py to svn_utils.pyc
 byte-compiling build\bdist.win32\egg\setuptools\tests\doctest.py to doctest.pyc
 byte-compiling build\bdist.win32\egg\setuptools\tests\environment.py to environm
 ent.pyc
 byte-compiling build\bdist.win32\egg\setuptools\tests\py26compat.py to py26compa
 t.pyc
 byte-compiling build\bdist.win32\egg\setuptools\tests\script-with-bom.py to scri
 pt-with-bom.pyc
 byte-compiling build\bdist.win32\egg\setuptools\tests\server.py to server.pyc
 byte-compiling build\bdist.win32\egg\setuptools\tests\test_bdist_egg.py to test_
 bdist_egg.pyc
 byte-compiling build\bdist.win32\egg\setuptools\tests\test_build_ext.py to test_
 build_ext.pyc
 byte-compiling build\bdist.win32\egg\setuptools\tests\test_develop.py to test_de
 velop.pyc
 byte-compiling build\bdist.win32\egg\setuptools\tests\test_dist_info.py to test_
 dist_info.pyc
 byte-compiling build\bdist.win32\egg\setuptools\tests\test_easy_install.py to te
 st_easy_install.pyc
 byte-compiling build\bdist.win32\egg\setuptools\tests\test_egg_info.py to test_e
 gg_info.pyc
 byte-compiling build\bdist.win32\egg\setuptools\tests\test_find_packages.py to t
 est_find_packages.pyc
 byte-compiling build\bdist.win32\egg\setuptools\tests\test_markerlib.py to test_
 markerlib.pyc
 byte-compiling build\bdist.win32\egg\setuptools\tests\test_packageindex.py to te
 st_packageindex.pyc
 byte-compiling build\bdist.win32\egg\setuptools\tests\test_resources.py to test_
 resources.pyc
 byte-compiling build\bdist.win32\egg\setuptools\tests\test_sandbox.py to test_sa
 ndbox.pyc
 byte-compiling build\bdist.win32\egg\setuptools\tests\test_sdist.py to test_sdis
 t.pyc
 byte-compiling build\bdist.win32\egg\setuptools\tests\test_svn.py to test_svn.py
 c
 byte-compiling build\bdist.win32\egg\setuptools\tests\test_test.py to test_test.
 pyc
 byte-compiling build\bdist.win32\egg\setuptools\tests\test_upload_docs.py to tes
 t_upload_docs.pyc
 byte-compiling build\bdist.win32\egg\setuptools\tests\__init__.py to __init__.py
 c
 byte-compiling build\bdist.win32\egg\setuptools\version.py to version.pyc
 byte-compiling build\bdist.win32\egg\setuptools\__init__.py to __init__.pyc
 byte-compiling build\bdist.win32\egg\_markerlib\markers.py to markers.pyc
 byte-compiling build\bdist.win32\egg\_markerlib\__init__.py to __init__.pyc
 creating build\bdist.win32\egg\EGG-INFO
 copying setuptools.egg-info\PKG-INFO -> build\bdist.win32\egg\EGG-INFO
 copying setuptools.egg-info\SOURCES.txt -> build\bdist.win32\egg\EGG-INFO
 copying setuptools.egg-info\dependency_links.txt -> build\bdist.win32\egg\EGG-IN
 FO
 copying setuptools.egg-info\entry_points.txt -> build\bdist.win32\egg\EGG-INFO
 copying setuptools.egg-info\requires.txt -> build\bdist.win32\egg\EGG-INFO
 copying setuptools.egg-info\top_level.txt -> build\bdist.win32\egg\EGG-INFO
 copying setuptools.egg-info\zip-safe -> build\bdist.win32\egg\EGG-INFO
 creating dist
 creating 'dist\setuptools-3.5.1-py2.7.egg' and adding 'build\bdist.win32\egg' to
  it
 removing 'build\bdist.win32\egg' (and everything under it)
 Processing setuptools-3.5.1-py2.7.egg
 Removing c:\python27\lib\site-packages\setuptools-3.5.1-py2.7.egg
 Copying setuptools-3.5.1-py2.7.egg to c:\python27\lib\site-packages
 setuptools 3.5.1 is already the active version in easy-install.pth
 Installing easy_install-script.py script to C:\Python27\Scripts
 Installing easy_install.exe script to C:\Python27\Scripts
 Installing easy_install.exe.manifest script to C:\Python27\Scripts
 Installing easy_install-2.7-script.py script to C:\Python27\Scripts
 Installing easy_install-2.7.exe script to C:\Python27\Scripts
 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 install

2 个答案:

答案 0 :(得分:0)

你可以在没有'install'的情况下尝试相同,我从未使用过install -command。或者一个可能的选择是你ez_setup.py坏了或坏了,我一直在使用它:https://bitbucket.org/pypa/setuptools/raw/bootstrap/ez_setup.py

答案 1 :(得分:0)

对于发生在这个问题上的任何人:我使用了anaconda安装程序,现在一切都运行良好。我会避开我走的路,然后直接去anaconda。