Python 项目设置损坏

时间:2020-12-23 06:47:18

标签: python pip

我有项目,以前运行良好,但是当我切换到其他项目几个月时,现在当我再次尝试安装该项目时,它给了我以下错误。

我使用的是 Mac Mojave。 错误太大,所以我无法粘贴,只能附上图片。

enter image description here enter image description here enter image description here enter image description here

2 个答案:

答案 0 :(得分:0)

from setuptools import Feature 不起作用,因为 Featureremoved 之后是来自 setuptools 的 deprecated in 2013。您可以pin an old setuptools version或停止使用它(参见this示例)。

  1. 固定旧版本:在您的要求中,明确列出 setuptools==45(或使用 pip install setuptools==45 之类的东西预先安装)。
  2. 停止使用它:不要使用 Feature,而是使用等效的工具(取决于您使用 Feature 的目的)。 Here 是从 markupsafe 项目中删除 Feature 的一个示例。

答案 1 :(得分:0)

此功能已在 46.0.0 中被有意删除。您可以降级到 setuptools<46 以构建/安装包。

参考-> https://setuptools.readthedocs.io/en/latest/history.html#v46-0-0