我正在尝试运行poetry install
命令,但出现以下错误:
[EnvCommandError]
Command ['pip', 'install', '-e', '<PROJECT_FOLDER_PATH>'] errored with
the following return code 1, and output:
Obtaining file:///<PROJECT_FOLDER_PATH>
ERROR: Package '<subfolder>' requires a different Python: 3.6.8 not in '>=3.7,<4.0'
我的项目目录包含.toml
文件被标记为<PROJECT_FOLDER>
(PROJECT_FOLDER_PATH
相应地,它是完整路径),它包含<subfolder>
.
我的toml
文件的一部分:
[tool.poetry]
name = "<PROJECT_FOLDER>"
version = "0.1.0"
description = ""
authors = ["Your Name <you@example.com>"]
[tool.poetry.dependencies]
python = "^3.7"
似乎诗歌试图将项目本身安装为依赖项,但由于某种我不明白的原因,它似乎是冲突的 Python 版本。我通过设置暂时解决了它python = "^3.6"
,但现在问题又回来了,因为我需要一些只接受的包python = "^3.7"
。