Python 在C中找不到pyproject.toml文件:\

Python 在C中找不到pyproject.toml文件:\,python,python-poetry,Python,Python Poetry,我正在运行Python 3.9.1,并且已经成功安装了Poethy版本1.1.4。 当我尝试添加请求时($poyment add requests),我面临的是 RuntimeError Poetry could not find a pyproject.toml file in C:\... 我刚刚安装了它,我不确定我是否错过了什么。 有人可以建议吗?您必须先创建一个pyproject.toml。进入项目文件夹,运行poetry init,然后按照说明进行操作。另外,您可以运行newmypr

我正在运行Python 3.9.1,并且已经成功安装了Poethy版本1.1.4。 当我尝试添加请求时(
$poyment add requests
),我面临的是

RuntimeError
Poetry could not find a pyproject.toml file in C:\...
我刚刚安装了它,我不确定我是否错过了什么。
有人可以建议吗?

您必须先创建一个
pyproject.toml
。进入项目文件夹,运行
poetry init
,然后按照说明进行操作。另外,您可以运行
newmyproject
来创建基本文件夹结构和
pyproject.toml
。同时也要看一看