存在诗歌错误“'setup.py' [...] 未找到”

poetry error "'setup.py' [...] not found" when it exists

我正在将 Python 项目的打包工具从 pipenv 迁移到 poetry

但是,在尝试安装 jaro-winkler(使用 poetry add jaro-winkler)时,出现以下错误:

  • Installing jaro-winkler (2.0.1.linux-x86_64): Failed

  EnvCommandError

Command ['/Users/user/Library/Caches/pypoetry/virtualenvs/project-K9Q4AUpY-py3.8/bin/pip', 'install', '--no-deps', 'file:///Users/user/Library/Caches/pypoetry/artifacts/45/cc/59/250d5db2cbcb15286dbae09b9f00727ea007ee685834709a5ac2772716/jaro_winkler-2.0.1.linux-x86_64.tar.gz'] errored with the following return code 1, and output: 
Looking in indexes: https://pypi.org/simple
  Processing /Users/user/Library/Caches/pypoetry/artifacts/45/cc/59/250d5db2cbcb15286dbae09b9f00727ea007ee685834709a5ac2772716/jaro_winkler-2.0.1.linux-x86_64.tar.gz
  ERROR: file:///Users/user/Library/Caches/pypoetry/artifacts/45/cc/59/250d5db2cbcb15286dbae09b9f00727ea007ee685834709a5ac2772716/jaro_winkler-2.0.1.linux-x86_64.tar.gz does not appear to be a Python project: neither 'setup.py' nor 'pyproject.toml' found.

我的第一个想法是检查 Github 上的 jaro-winkler 项目,以检查是否确实存在 setup.pypyproject.toml 文件,根据错误消息 ... does not appear to be a Python project: neither 'setup.py' nor 'pyproject.toml' found.

但是很明显一个setup.py文件,见here

为什么 poetry 找不到并正确安装?

包不是从 GitHub 安装的。它是从 PyPi 安装的。文件的内容看起来出乎意料。参见 https://pypi.org/project/jaro-winkler/2.0.1/#files