【问题标题】:"python setup.py egg_info" failed with error code 1 when installing autosub“python setup.py egg_info”在安装 autosub 时失败,错误代码为 1
【发布时间】:2017-09-25 04:36:50
【问题描述】:

我尝试安装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-3.6 egg


    【解决方案1】:

    -错误安装pip

    “python setup.py egg_info”

    解决方案

    安装 Python 2.7 卸载 3.x

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

    【讨论】:

      【解决方案2】:

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

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

      【讨论】:

        猜你喜欢
        • 2019-10-31
        • 2020-01-20
        • 2019-01-04
        • 1970-01-01
        • 2018-11-21
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多