安装autosub时,“python setup.py egg_info”失败,错误代码为1

时间:2017-04-27 11:45:01

标签: pip python-3.6 egg

我尝试安装Autosub,但显示错误,我找不到适合我的解决方案。

我已经安装了Autosub所需的ffmpeg并为其添加了路径。

我也升级了我的setuptools。

C:\WINDOWS\system32>pip install autosub
Collecting autosub
  Using cached autosub-0.3.11.tar.gz
Collecting google-api-python-client>=1.4.2 (from autosub)
  Using cached google_api_python_client-1.6.2-py2.py3-none-any.whl
Requirement already satisfied: requests>=2.3.0 in c:\program files\python36\lib\site-packages (from autosub)
Collecting pysrt>=1.0.1 (from autosub)
  Using cached pysrt-1.1.1.tar.gz
Collecting progressbar>=2.3 (from autosub)
  Using cached progressbar-2.3.tar.gz
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "C:\Users\CHEKWE~1\AppData\Local\Temp\pip-build-4wnmhm6k\progressbar\setup.py", line 5, in <module>
        import progressbar
      File "C:\Users\CHEKWE~1\AppData\Local\Temp\pip-build-4wnmhm6k\progressbar\progressbar\__init__.py", line 59, in <module>
        from progressbar.widgets import *
      File "C:\Users\CHEKWE~1\AppData\Local\Temp\pip-build-4wnmhm6k\progressbar\progressbar\widgets.py", line 121, in <module>
        class FileTransferSpeed(Widget):
      File "c:\program files\python36\lib\abc.py", line 133, in __new__
        cls = super().__new__(mcls, name, bases, namespace)
    ValueError: 'format' in __slots__ conflicts with class variable

    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in C:\Users\CHEKWE~1\AppData\Local\Temp\pip-build-4wnmhm6k\progressbar\

我找到了另一个答案,表示输入easy_install -U setuptools但也显示错误。 (cmd以管理员身份运行)

C:\WINDOWS\system32>easy_install -U setuptools
Searching for setuptools
Reading https://pypi.python.org/simple/setuptools/
Best match: setuptools 35.0.1
Processing setuptools-35.0.1-py3.6.egg
setuptools 35.0.1 is already the active version in easy-install.pth
Installing easy_install-script.py script to c:\program files\python36\Scripts
Installing easy_install.exe script to c:\program files\python36\Scripts
error: [WinError 5] Access is denied: 'c:\\program files\\python36\\Scripts\\easy_install.exe'

任何帮助都将不胜感激。

2 个答案:

答案 0 :(得分:1)

-Error install pip

&#34; python setup.py egg_info&#34;

<强>解决方案

安装Python 2.7 uninstall 3.x

https://github.com/agermanidis/autosub/issues/31

答案 1 :(得分:0)

如果在运行Alpine Docker容器时遇到此问题,对我来说就是这种情况。尝试将以下行添加到value1, value2中以安装所需的依赖项。

Dockerfile