【问题标题】:Pip Install python package: cannot find requirements.txtPip安装python包:找不到requirements.txt
【发布时间】:2020-04-30 08:06:18
【问题描述】:

我正在尝试安装包 gamry-parser (https://pypi.org/project/gamry-parser/)。

但是,命令窗口无法在它要查找的位置找到 requirements.txt。我试图在我的计算机中搜索它正在搜索的路径,但它似乎不存在(c:\users\name\appdata\local\temp\pip-install-rfy1sh\gamry-parser\setup. py)。此外,requirements.txt 确实存在,但不在这个不存在的路径中。我收到以下错误:

IOError: [Errno 2] No such file or directory: 'requirements.txt'
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

谢谢。

【问题讨论】:

  • 看起来这个项目的包装有问题,向那个项目的维护者报告这个问题是有意义的。

标签: python path pip command requirements


【解决方案1】:

gamry-parser 0.4.1 provides 用于 Python 3 的轮子和将用于 Python 2.7 的源 dist。我对它们进行了测试——安装了 Python 3.7 的轮子,没问题。

问题在于 Python 2.7 和源代码分发版 — sdist 缺少 requirements.txt。要修复它,他们需要添加文件 MANIFEST.in:

echo include requirements.txt > MANIFEST.in
git add MANIFEST.in
git commit -m "Add MANIFEST.in for sdist"

report the issue 或发送拉取请求。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2013-07-21
    • 2018-03-16
    • 2015-03-25
    • 2018-05-24
    • 2012-06-16
    • 2018-06-19
    • 1970-01-01
    • 2018-06-28
    相关资源
    最近更新 更多