28

I am setting poetry to create virtual environments in the project directory. I entered:

poetry config settings.virtualenvs.in-project true

and received error

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

Also there is the text

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)

How can I solve the error?

It seems that error deals with version of the python.

I am using Ubuntu 16.04 version

Poetry version 1.0.5

2
  • Are you using poetry version 0.10.0 or greater? That's the version of poetry that added that setting. Also, I was under the impression poetry only works with python3, which also might be causing you issues. Commented May 26, 2020 at 19:06
  • @ptd Poetry version 1.0.5 Commented May 26, 2020 at 19:07

1 Answer 1

52

The config has changed with the release of poetry 1.0. The prefix settings is no longer needed. So just type poetry config virtualenvs.in-project true.

Concerning the subprocess warning: This seems to be just a warning and has no influence on the correct working of poetry. Also have a look at my comment in poetry's issue tracker.

@ptd: poetry can work with python2 and python3.

Sign up to request clarification or add additional context in comments.

2 Comments

@finswimmer is it possible to set this configuration in pyproject.toml. I tried the below but it wont work ``` [virtualenvs] in-project = true ```
If you run poetry config with --local option, the config is written to a poetry.toml within your project. This file is meant for local configurations and should not be added to the repository.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.