Python-poetry error: Setting settings.virtualenvs.in-project does not exist

Python-poetry error: Setting settings.virtualenvs.in-project does not exist

我正在设置 poetry 以在项目目录中创建虚拟环境。 我输入了:

poetry config settings.virtualenvs.in-project true

收到错误

[ValueError] Setting settings.virtualenvs.in-project does not exist

还有正文

home/alex/.poetry/lib/poetry/_vendor/py2.7/subprocess32.py:149: RuntimeWarning: The _posixsubprocess module is not being used. Child process reliability may suffer if your program uses threads. "program uses threads.", RuntimeWarning)

如何解决错误?

似乎错误涉及 python 的版本。

我正在使用Ubuntu 16.04 版本

诗歌1.0.5版本

随着 poetry 1.0 的发布,配置发生了变化。不再需要前缀 settings。所以只需输入 poetry config virtualenvs.in-project true.

关于subprocess警告:这似乎只是一个警告,对诗歌的正确工作没有影响。也看看我的 comment in poetry's issue tracker.

@ptd:诗歌可以与 python2 和 python3 一起使用。