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

"python setup.py egg_info" failed with error code 1 when installing autosub

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

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

我也升级了我的设置工具。

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'

如有任何帮助,我们将不胜感激。

-安装pip时出错

"python setup.py egg_info"

解决方案

安装Python2.7卸载3.x

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

如果您 运行 在 运行 使用 Alpine Docker 容器时遇到这个问题,我就是这种情况。尝试将以下行添加到您的 Dockerfile 以安装所需的依赖项。

RUN apk update && apk add postgresql-dev gcc python3-dev musl-dev