13

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.
    – ptd
    May 26, 2020 at 19:06
  • @ptd Poetry version 1.0.5
    – mascai
    May 26, 2020 at 19:07

1 Answer 1

31

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.

3
  • Thank you! It helps me!
    – mascai
    Jun 11, 2020 at 17:00
  • @finswimmer is it possible to set this configuration in pyproject.toml. I tried the below but it wont work ``` [virtualenvs] in-project = true ```
    – lordvcs
    Oct 31, 2022 at 6:14
  • 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.
    – finswimmer
    Oct 31, 2022 at 7:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.