-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Closed
Labels
area/cliRelated to the command lineRelated to the command linearea/initRelated to 'poetry init'/project creationRelated to 'poetry init'/project creationarea/uxFeatures and improvements related to the user experienceFeatures and improvements related to the user experiencekind/featureFeature requests/implementationsFeature requests/implementations
Description
Discussed in https://github.com/orgs/python-poetry/discussions/7059
Originally posted by david-vicente November 19, 2022
Consider the following situation: I'm using pyenv to manage my python versions and want to start a new project using poetry.
I thought that if I ran
$ pyenv versions
* system
3.11.0 $ pyenv shell 3.11.0Then using poetry to start a new project, like
$ poetry new myprojectwould create a new folder with all the relevant stuff inside, and file pyproject.toml would be
[tool.poetry]
name = "myproject"
version = "0.1.0"
description = ""
authors = ["Me <[email protected]>"]
readme = "README.md"
[tool.poetry.dependencies]
python = "^3.11"
[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"notice the python version. However this is not the case as poetry new <project name> seems to ignore the active python version and go with the system one.
Is this the intended behavior? Shouldn't poetry new and poetry init take into consideration the active python version?
I'm aware of other issues with similar questions:
- PyEnv + Poetry: Poetry does not use correct Python versions #5252 for example is about the command
poetry installconsidering the active python version, so it regards the virtualenvs managed by poetry but not thepyproject.tomlfile.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
area/cliRelated to the command lineRelated to the command linearea/initRelated to 'poetry init'/project creationRelated to 'poetry init'/project creationarea/uxFeatures and improvements related to the user experienceFeatures and improvements related to the user experiencekind/featureFeature requests/implementationsFeature requests/implementations