简体   繁体   English

pyproject.toml 的诗歌问题“诗歌在 D:\... 中找不到 pyproject.toml 文件”

[英]Poetry issue with pyproject.toml "Poetry could not find a pyproject.toml file in D:\..."

I am trying to create a virtual environment with poetry, following the instructions given in Poetry Basic Usage我正在尝试按照诗歌基本用法中给出的说明创建一个带有诗歌的虚拟环境

My problem is the following:我的问题如下:

I use the script: poetry new poetry-demo我用脚本: poetry new poetry-demo

And this automatically and successfully creates the folder for the poetry-demo, you can see it in the attached image.这会自动成功地为诗歌演示创建文件夹,您可以在附图中看到它。

诗歌演示文件夹

But, when I go to the next step which is to add new dependencies, in this case: poetry add pendulum , I get the following error.但是,当我进入下一步是添加新的依赖项时,在这种情况下: poetry add pendulum ,我收到以下错误。

"Poetry could not find a pyproject.toml file in D:..." “诗歌在 D:... 中找不到 pyproject.toml 文件”

I've searched and I can't find why it's failing me if I'm following the steps explained in the Poetry documentation and obviously the "pyproject.toml" is there.我已经搜索过了,如果我按照 Poetry 文档中解释的步骤进行操作并且显然“pyproject.toml”就在那里,我找不到它为什么会失败。

In case you wonder, my version of poetry is 1.1.13如果你想知道,我的诗歌版本是 1.1.13

Ok, I already figured it out, I was not on the same folder.好的,我已经想通了,我不在同一个文件夹中。

I just had to change of directory to get inside the correct folder where I had the "pyproject.toml".我只需要更改目录即可进入拥有“pyproject.toml”的正确文件夹。

Hope this helps anyone with the same issue in the future.希望这对将来遇到同样问题的人有所帮助。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM