诗意:用python>=2.7解析依赖项

2024-05-26 20:45:57 发布

您现在位置:Python中文网/ 问答频道 /正文

我有一个基于Python2.7和Python3.9的项目

我正在使用以下pyproject.toml:

[build-system]
requires = ["poetry_core>=1.1.4"]
build-backend = "poetry.core.masonry.api"

[tool.poetry]
name = "MyProject"
version = "1.0.0"
description = ""
authors = [""]
readme = ""
repository = ""
homepage = ""

[tool.poetry.dependencies]
python = ">=2.7"
bcrypt = "*"
pywin32 = [
    {version = "228", python = "^2.7"},
    {version = "300", python = "^3.0"}, 
]

当执行poetry update时,进程将永远停留在"Resolving dependencies..."

如果我用python = "^2.7"替换python依赖项,它可以工作(但不能安装在python 3上),如果我用python = "^3.0"替换它,它也可以工作(但不能安装在python 2上)

我该怎么办


Tags: 项目namecorebuildapibackendpoetryversion

热门问题