在 Windows XP 上安装 Python 2.7 之后,然后手动设置%PATH%
to python.exe
(为什么 python 安装程序不这样做?),然后安装setuptools 0.6c11
(为什么 python 安装程序不这样做?),然后手动设置%PATH%
to easy_install.exe
(为什么不这样做? t 安装程序这样做?),我终于尝试使用 安装 python 包easy_install
,但是easy_install
当它无法安装 pywin32 包时失败,这是一个依赖项。如何使 easy_install 在 Windows XP 上正常工作?失败如下:
C:\>easy_install winpexpect 正在搜索 winpexpect 最佳匹配:winpexpect 1.4 处理winpexpect-1.4-py2.7.egg winpexpect 1.4 已经是 easy-install.pth 中的活动版本 使用 c:\python27\lib\site-packages\winpexpect-1.4-py2.7.egg 处理 winpexpect 的依赖关系 搜索 pywin32>=214 阅读 http://pypi.python.org/simple/pywin32/ 阅读 http://sf.net/projects/pywin32 阅读 http://sourceforge.net/project/showfiles.php?group_id=78018 找不到 pywin32>=214 的本地包或下载链接 最佳匹配:无 回溯(最近一次通话最后): 文件“C:\python27\scripts\easy_install-script.py”,第 8 行,在 load_entry_point('setuptools==0.6c11', 'console_scripts', 'easy_install')() 文件“C:\python27\lib\site-packages\setuptools\command\easy_install.py”,第 1712 行,在 main with_ei_usage(lambda: 文件“C:\python27\lib\site-packages\setuptools\command\easy_install.py”,第 1700 行,在 with_ei_usage 返回 f() 文件“C:\python27\lib\site-packages\setuptools\command\easy_install.py”,第 1716 行,在 distclass=DistributionWithoutHelpCommands, **kw 文件“C:\python27\lib\distutils\core.py”,第 152 行,在设置中 dist.run_commands() 文件“C:\python27\lib\distutils\dist.py”,第 953 行,在 run_commands self.run_command(cmd) 文件“C:\python27\lib\distutils\dist.py”,第 972 行,在 run_command cmd_obj.run() 运行中的文件“C:\python27\lib\site-packages\setuptools\command\easy_install.py”,第 211 行 self.easy_install(规范,不是 self.no_deps) 文件“C:\python27\lib\site-packages\setuptools\command\easy_install.py”,第 446 行,在 easy_install return self.install_item(spec, dist.location, tmpdir, deps) 文件“C:\python27\lib\site-packages\setuptools\command\easy_install.py”,第 481 行,在 install_item self.process_distribution(spec, dists[0], deps, "使用") 文件“C:\python27\lib\site-packages\setuptools\command\easy_install.py”,第 519 行,在 process_distribution [要求]、self.local_index、self.easy_install 解析中的文件“C:\python27\lib\site-packages\pkg_resources.py”,第 563 行 dist = best[req.key] = env.best_match(req, self, installer) 文件“C:\python27\lib\site-packages\pkg_resources.py”,第 799 行,在 best_match return self.obtain(req, installer) # 尝试下载/安装 文件“C:\python27\lib\site-packages\pkg_resources.py”,第 811 行,在获取 返回安装程序(要求) 文件“C:\python27\lib\site-packages\setuptools\command\easy_install.py”,第 434 行,在 easy_install self.local_index 文件“C:\python27\lib\site-packages\setuptools\package_index.py”,第 475 行,在 fetch_distribution 返回 dist.clone(location=self.download(dist.location, tmpdir)) AttributeError:“NoneType”对象没有属性“克隆”