【问题标题】:ERROR: Could not open requirements file: [Errno 2] No such file or directory: 'requirements.txt'错误:无法打开需求文件:[Errno 2] 没有这样的文件或目录:'requirements.txt'
【发布时间】:2021-10-12 09:28:55
【问题描述】:

我正在尝试运行此项目 (https://github.com/unitedstates/congress#readme),但在使用命令 pip3 install -r requirements.txt 时遇到问题并收到错误 ERROR: Could not open requirements file: [Errno 2] No such file or directory: 'requirements.txt'。我一直在尝试一些解决方案,但最后,当我尝试运行它时,它说./run not found。如何安装正确的软件包。

我正在运行 Mac M1。

【问题讨论】:

  • 你在正确的目录吗?
  • 你克隆了 Github repo 吗?
  • 查看如何创建minimal reproducible example
  • 非常感谢!我意识到我错误地克隆了它并且不在正确的位置。我没有意识到这一点。

标签: python


【解决方案1】:

首先克隆您的项目(您可以将其保存在任何地方)。

确保您已安装自制软件。

确保进入您刚刚在终端中克隆的项目的 Congress 文件夹。

然后运行python3 -m venv congress source congress/bin/activate

然后pip3 install -r requirements.txt requirements.txt 文件将在主会议文件夹中。

之后,您可以使用./run govinfo --bulkdata=BILLSTATUS ./run bills 运行账单或使用./test/run 进行测试。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2020-10-09
    • 2023-01-31
    • 2016-03-18
    • 2022-10-15
    • 2022-12-30
    • 2021-11-05
    • 2019-05-19
    • 1970-01-01
    相关资源
    最近更新 更多