python-poetry / python-poetry/poetry

Custom Virtual Env Name Not used

Open
#8,079 4 comments 0 reactions 1 assignee View on GitHub

@Secrus is already working on this.

Since Feb 1, 2024.

area/venv kind/bug status/triage
Dominant language
Python
Stars
34.3k
Forks
2.5k
Avg merge
2d 19h
Merged PRs (30d)
30

Description

  • Poetry version: Poetry (version 1.5.1
  • Python version:
  • OS version and name: macOS 13.4
  • pyproject.toml: pyproject.toml
  • I am on the latest stable Poetry version, installed using a recommended method.
  • I have searched the issues of this repo and believe that this is not a duplicate.
  • I have consulted the FAQ and blog for any relevant entries or release notes.
  • If an exception occurs when executing a command, I executed it again in debug mode (-vvv option) and have included the output below.

Issue

I have the following poetry.toml

[virtualenvs]
name = "evenv"
create = true
in-project = true

This is the output of ❯ poetry config --list

cache-dir = "/Users/jainal/Library/Caches/pypoetry"
experimental.system-git-client = false
installer.max-workers = null
installer.modern-installation = true
installer.no-binary = null
installer.parallel = true
virtualenvs.create = true
virtualenvs.in-project = true
virtualenvs.name = "evenv"
virtualenvs.options.always-copy = false
virtualenvs.options.no-pip = false
virtualenvs.options.no-setuptools = false
virtualenvs.options.system-site-packages = false
virtualenvs.path = "{cache-dir}/virtualenvs"  # /Users/jainal/Library/Caches/pypoetry/virtualenvs
virtualenvs.prefer-active-python = false
virtualenvs.prompt = "{project_name}-py{python_version}"

The is issue is irrespective of this config, poetry still creates the virtualenv with the name .venv . When it should create virtualenv evenv

Also, one weird thing is when I execute this command
poetry config virtualenvs.name evenv --local
I am getting this error
Setting virtualenvs.name does not exist

even if virtualenvs.name = "evenv" is in the config list above

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.