【问题标题】:Could not open requirements file: [Errno 2] No such file or directory: './requirements.txt' Python on Mac无法打开需求文件:[Errno 2] 没有这样的文件或目录:Mac 上的“./requirements.txt”Python
【发布时间】:2016-03-18 00:48:27
【问题描述】:

我正在尝试使用来自 github 的 code

开始使用的前三个命令是:

pip install bitfinex

bitfinex-poll-orderbook

pip install -r ./requirements.txt

前两个工作正常,我可以看到比特币交易交易所 Bitfinex 的订单簿。当我放第三行时,出现以下错误

Could not open requirements file: [Errno 2] No such file or directory: './requirements.txt'

我能做些什么来解决这个问题?

【问题讨论】:

  • 从 requirements.txt 所在的项目文件夹中运行命令
  • 好的,所以do you know what does it do? 我认为pip install bitfinex 命令可以自动安装需求。另外我认为你没有通过 git 或浏览器下载项目,所以没有requirements.txt。如果 pip 没有安装,你可以在 Github 的项目文件夹中找到它 here
  • 当我运行 pip install bitfinex 时,它说我的要求已经得到满足并且在适当的位置
  • 你是怎么解决的,虽然我从同一个文件夹运行 pip install -r requirements.txt,但我遇到了同样的问题

标签: python macos pip bitcoin requirements.txt


【解决方案1】:

您应该仅从存储库的克隆运行它,并且仅当您想要开发该库时。

【讨论】:

  • 这有帮助,但我还有另一个错误。命令 "/usr/bin/python -c "import setuptools, tokenize;__file__='/private/tmp/pip-build-AUyHaP/lxml/setup.py';exec(compile(getattr(tokenize, 'open', open )(file).read().replace('\r\n', '\n'), file, 'exec'))" install --record /tmp/pip-t_Dx3j-record/install-record.txt --single-version-externally-managed --compile" 失败,错误代码 1 在 /private/tmp/pip-build-AUyHaP/lxml
  • 该文件需要lxml==3.3.1,但它在 PyPI 中不再可用。您需要从其他地方获取它...或者尝试更改 requirements.txt 文件
  • 我下载了那个火,但仍然有一个错误命令 "/usr/bin/python -c "import setuptools, tokenize;__file__='/private/var/folders/zl/ny6y70vn3lb22pyz9cxl75j80000gn/T/pip -build-oPRVYA/lxml/setup.py';exec(compile(getattr(tokenize, 'open', open)(file).read().replace('\r\n', '\n'), file, 'exec'))" install --record /var/folders/zl/ny6y70vn3lb22pyz9cxl75j80000gn/T/pip-O7ugup-record/install-record.txt --single -version-externally-managed --compile" 失败,错误代码 1 在 /private/var/folders/zl/ny6y70vn3lb22pyz9cxl75j80000gn/T/pip-build-oPRVYA/lxml
  • This 是存储库,但您需要自己找到提交
  • 该文件夹应该放在哪里?
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 2022-10-15
  • 2020-10-09
  • 2023-01-31
  • 1970-01-01
  • 2022-12-30
  • 2019-10-24
  • 1970-01-01
相关资源
最近更新 更多