-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot configure options through environment variables #5906
Comments
Looks like not - see poetry/src/poetry/utils/env.py Line 983 in 8b64088
that'll cause poetry to look for the |
still no way to make --always-copy work for virtualenv creation? |
this issue is about not being able to configure those options through environment variables, per #7873 (comment) it works fine when configured another way |
I was hit by this today. This is the end result of my venv after sh-5.2$ ls .virtualenvs/my-venv/bin -la
total 56
drwxr-xr-x 2 user user 4096 Dec 11 10:45 .
drwxr-xr-x 5 user user 4096 Dec 11 10:44 ..
-rw-r--r-- 1 user user 9033 Dec 11 10:44 Activate.ps1
-rw-r--r-- 1 user user 2354 Dec 11 10:44 activate
-rw-r--r-- 1 user user 936 Dec 11 10:44 activate.csh
-rw-r--r-- 1 user user 2215 Dec 11 10:44 activate.fish
-rwxr-xr-x 1 user user 292 Dec 11 10:44 django-admin
-rwxr-xr-x 1 user user 246 Dec 11 10:45 gunicorn
-rwxr-xr-x 1 user user 250 Dec 11 10:44 pip
-rwxr-xr-x 1 user user 250 Dec 11 10:44 pip3
-rwxr-xr-x 1 user user 250 Dec 11 10:44 pip3.12
lrwxrwxrwx 1 user user 21 Dec 11 10:44 python -> /usr/local/bin/python
lrwxrwxrwx 1 user user 6 Dec 11 10:44 python3 -> python
lrwxrwxrwx 1 user user 6 Dec 11 10:44 python3.12 -> python
-rwxr-xr-x 1 user user 245 Dec 11 10:44 sqlformat
sh-5.2$ pip --version
pip 23.2.1 from /home/user/.virtualenvs/my-venv/lib/python3.12/site-packages/pip (python 3.12) |
Using Poetry version 1.7.1 (on Windows 10) noticed same issue with Setting it to true will show correctly in the config list: But when creating the venv ( If using command |
Using Poetry version 1.7.1 on Ubuntu (WSL2) and I can also reproduce this error. I did notice, however, that some flags work. For example, |
folks, this all has been well understood since #5906 (comment). No need to keep reporting that it is still a thing - that's represented already by this still being open. what this issue needs now is someone who cares enough to make a merge request fixing it: if that's you then please go ahead! |
Fixed at #9015 |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
-vvv
option).Issue
When calling
poetry
using environment variables to configure options, they do not seem to be respected. From the documentation, I would expect to be able to create a virtual environment withoutpip
using something like the following:POETRY_VIRTUALENVS_OPTIONS_NO_PIP=true POETRY_VIRTUALENVS_IN_PROJECT=true POETRY_VIRTUALENVS_PATH=.venv poetry install
The last two values work. Poetry is installed in the project in a folder named
.venv
-- however,pip
is still in thesite-packages
folder.I've tried the other "options" as well, and tried different ways to name them but have not been successful.
Are options able to be configured by environment variables?
The text was updated successfully, but these errors were encountered: