Skip to content

Poetry does not use active pyenv when creating virtual environment #651

@bjoernpollex

Description

@bjoernpollex
  • I am on the latest Poetry version.

  • I have searched the issues of this repo and believe that this is not a duplicate.

  • OS version and name: MacOS 10.14 Mojave

  • Poetry version: 0.12.8

Issue

I have a project directory with a .python-version file like this:

3.7.1

Poetry has been installed into Python 3.6.5. According to recent comments, poetry is supposed to detect the active Python version when creating a new virtual environment, but it seems to stick with 3.6.5 all the time. To illustrate:

$ python --version
Python 3.7.1
$ poetry run python --version
Python 3.6.5

When I specify python = "^3.7" in `pyproject.toml I get an error:

$ poetry shell

[RuntimeError]
The current Python version (3.6.5) is not supported by the project (^3.7)
Please activate a compatible Python version.

shell

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions