使用 Clearbit API 的 Pip 安装错误退出状态 1

Pip install error exit status 1 with Clearbit API

我正在尝试按照以下指导 pip install clearbit: Link 1 Link 2

我在 Python 3.9.7 和 pip 版本 21.3。我还根据其他 Whosebug 答案更新了我的设置工具。

我 运行 在我的 Mac 终端上的命令是:

pip install clearbit

但是我遇到了一系列错误。示例错误块指出:

  Using cached clearbit-0.0.2.tar.gz (2.9 kB)
  Preparing metadata (setup.py) ... error
  ERROR: Command errored out with exit status 1:
   command: /Library/Frameworks/Python.framework/Versions/3.9/bin/python3 -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/nv/d5h78rrs0t9625k940k5f4ww0000gn/T/pip-install-plp1xoqf/clearbit_e710a979acd3433290a538760255e4c4/setup.py'"'"'; __file__='"'"'/private/var/folders/nv/d5h78rrs0t9625k940k5f4ww0000gn/T/pip-install-plp1xoqf/clearbit_e710a979acd3433290a538760255e4c4/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /private/var/folders/nv/d5h78rrs0t9625k940k5f4ww0000gn/T/pip-pip-egg-info-jnpe31nd
       cwd: /private/var/folders/nv/d5h78rrs0t9625k940k5f4ww0000gn/T/pip-install-plp1xoqf/clearbit_e710a979acd3433290a538760255e4c4/
  Complete output (1 lines):
  error in clearbit setup command: use_2to3 is invalid.
  ----------------------------------------
WARNING: Discarding https://files.pythonhosted.org/packages/71/44/d8de83ca49c310895481e2f9d4657476c323a60b3186be7afeb584814263/clearbit-0.0.2.tar.gz#sha256=b39180db8e6ac159febe54fb0e0e84c8f0c8facf832c551c1175c758c255326b (from https://pypi.org/simple/clearbit/). Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

  Using cached clearbit-0.0.1.tar.gz (2.7 kB)
  Preparing metadata (setup.py) ... error
  ERROR: Command errored out with exit status 1:
   command: /Library/Frameworks/Python.framework/Versions/3.9/bin/python3 -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/nv/d5h78rrs0t9625k940k5f4ww0000gn/T/pip-install-plp1xoqf/clearbit_4716e56973294efd87482725d29438ec/setup.py'"'"'; __file__='"'"'/private/var/folders/nv/d5h78rrs0t9625k940k5f4ww0000gn/T/pip-install-plp1xoqf/clearbit_4716e56973294efd87482725d29438ec/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /private/var/folders/nv/d5h78rrs0t9625k940k5f4ww0000gn/T/pip-pip-egg-info-3_q7g_32
       cwd: /private/var/folders/nv/d5h78rrs0t9625k940k5f4ww0000gn/T/pip-install-plp1xoqf/clearbit_4716e56973294efd87482725d29438ec/
  Complete output (5 lines):
  Traceback (most recent call last):
    File "<string>", line 1, in <module>
    File "/private/var/folders/nv/d5h78rrs0t9625k940k5f4ww0000gn/T/pip-install-plp1xoqf/clearbit_4716e56973294efd87482725d29438ec/setup.py", line 22, in <module>
      with open('README.md') as f:
  FileNotFoundError: [Errno 2] No such file or directory: 'README.md'
  ----------------------------------------
WARNING: Discarding https://files.pythonhosted.org/packages/0d/50/76018c4fd50de45bd927010ae85c7c0e2f8f385f3e90e1ca6aedc5a2ded6/clearbit-0.0.1.tar.gz#sha256=247b48b17c9052aac5551bd6fa1da617f50a8ba883ab78827df53228ead0da57 (from https://pypi.org/simple/clearbit/). Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
ERROR: Could not find a version that satisfies the requirement clearbit (from versions: 0.0.1, 0.0.2, 0.0.4, 0.0.5, 0.0.6, 0.0.7, 0.0.8, 0.1.0, 0.1.1, 0.1.2, 0.1.3, 0.1.4, 0.1.5, 0.1.6, 0.1.7)
ERROR: No matching distribution found for clearbit

我找不到任何有关如何解决此问题的指南。我想知道是否有人对如何解决此问题有任何想法?我对 Python 和 CLI 很陌生,所以任何帮助将不胜感激!

根据包分类器(参见 here),clearbit 似乎无法安装在 Python 3.9 上,因为它不在分类器上。您必须要求维护者发布 Python 3.9 兼容版本。

另一个问题(您应该注意)是 clearbit 正在使用 setuptools use_2to3 命令(现在不受支持)。

无论如何,你应该向项目开发者寻求帮助,或者将你的 Python 版本降级到兼容的版本(但是,这样效率不高)。