【问题标题】:Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-install-rJRUpL/pyfinite/命令“python setup.py egg_info”在 /tmp/pip-install-rJRUpL/pyfinite/ 中失败,错误代码为 1
【发布时间】:2019-05-29 03:10:14
【问题描述】:

我正在尝试使用

安装 pyfinite

pip 安装 pyfinite

但是当我尝试时,我得到以下错误:

    Collecting pyfinite
  Downloading https://files.pythonhosted.org/packages/ca/d3/c836cdb45006961c7917572d9673a0bd9e9e241df264cccca96cbbca1221/pyfinite-1.7.tar.gz
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-install-rJRUpL/pyfinite/setup.py", line 30, in <module>
        long_description=get_readme(),
      File "/tmp/pip-install-rJRUpL/pyfinite/setup.py", line 21, in get_readme
        with open(path.join(here, 'README.rst'), encoding='utf-8') as my_fd:
    TypeError: 'encoding' is an invalid keyword argument for this function

    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-install-rJRUpL/pyfinite/

我重新安装了 pip,但这并没有解决我的问题,尽管我使用 sudo 执行了 pip 命令,但这并没有解决我的问题。

我的操作系统是ubuntu 18.04

怎么了?如何解决?

【问题讨论】:

    标签: python ubuntu pip ubuntu-18.04


    【解决方案1】:

    pyfinite is Python3-only,它不适用于 Python 2.7。

    【讨论】:

    • 所以它只适用于 pip3 install pyfinite?但在官方网站上,他们使用的是 pip 而不是 pip3
    • 如果只安装Python3,则无需将pip命名为pip3pippip3 之间的区别对于区分 Python2 的 pip 和 Python3 的 pip 很重要。同样在 virtualenv 中,无论 Python 版本如何,该脚本都称为 pip
    猜你喜欢
    • 2019-08-10
    • 2018-11-12
    • 2019-08-21
    • 2020-07-19
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2017-11-04
    • 1970-01-01
    相关资源
    最近更新 更多