0

我在 Windows 上安装 Python 包时遇到了困难。关注本网站上的所有问题以及我通过谷歌找到的其他问题并没有解决问题。

我最初遵循本指南: http ://docs.python-guide.org/en/latest/starting/install/win/

我尝试重新安装 Python、更新 pip 和其余安装包、使用 python install tabular 手动安装、更新注册表以及在干净的 VM 中安装新的 Python 副本。

提前感谢您的帮助!

这是 pip 的输出:

>  Running setup.py egg_info for package tabular
> 
>     Traceback (most recent call last):
> 
>       File "<string>", line 16, in <module>
> 
>       File "c:\users\jgerber\appdata\local\temp\pip_build_jgerber\tabular\setup.py",
> line 50, in <module>
> 
>         raise ImportError("distribute was not found and fallback to setuptools was not allowed")
> 
>     ImportError: distribute was not found and fallback to setuptools was not allowed
> 
>     Complete output from command python setup.py egg_info:
> 
>     Traceback (most recent call last):
> 
>   File "<string>", line 16, in <module>
> 
>   File
> "c:\users\jgerber\appdata\local\temp\pip_build_jgerber\tabular\setup.py",
> line 50, in <module>
> 
>     raise ImportError("distribute was not found and fallback to setuptools was not allowed")
> 
> ImportError: distribute was not found and fallback to setuptools was
> not allowed
> 
> ----------------------------------------
> 
> Cleaning up...
> 
>   Removing temporary dir
> c:\users\jgerber\appdata\local\temp\pip_build_jgerber... Command
> python setup.py egg_info failed with error code 1 in
> c:\users\jgerber\appdata\local\temp\pip_build_jgerber\tabular
> 
> Exception information: Traceback (most recent call last):   File
> "C:\Python27\lib\site-packages\pip\basecommand.py", line 134, in main
>     status = self.run(options, args)   File "C:\Python27\lib\site-packages\pip\commands\install.py", line 236, in
> run
>     requirement_set.prepare_files(finder, force_root_egg_info=self.bundle, bundle=self.bundle)   File
> "C:\Python27\lib\site-packages\pip\req.py", line 1134, in
> prepare_files
>     req_to_install.run_egg_info()   File "C:\Python27\lib\site-packages\pip\req.py", line 259, in run_egg_info
>     command_desc='python setup.py egg_info')   File "C:\Python27\lib\site-packages\pip\util.py", line 670, in
> call_subprocess
>     % (command_desc, proc.returncode, cwd)) InstallationError: Command python setup.py egg_info failed with error code 1 in
> c:\users\jgerber\appdata\local\temp\pip_build_jgerber\tabular
4

2 回答 2

1

pip 找不到分发

pip install distribute

或者如果 pip 的路径未设置运行c:\python27\Scripts\pip.exe distribute


你可以类似地尝试easy_install distribute

或者c:\python27\Scripts\easy_install.exe distribute

于 2013-10-07T19:15:14.877 回答
0

我对 Windows 上的表格也有同样的问题。通过将 http://python-distribute.org/distribute_setup.py包含 在与 setup.py 文件相同的文件夹中,它可以顺利安装。

于 2014-03-04T20:02:28.333 回答