You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have searched the issue tracker and believe that this is not a duplicate.
Make sure you run commands with -v flag before pasting the output.
Steps to reproduce
Create a virtualenv manually: python -m venv .venv
Tell PDM to use this virtualenv with a relative path: pdm use --ignore-remembered .venv/bin/python
Actual behavior
PDM prompts, asking to select between the absolute and relative paths to the interpreter. This breaks CI jobs.
$ pdm -v use --ignore-remembered .venv/bin/python
Please enter the Python interpreter to use
0. /home/brcampbell/src/gitlab-ci/.venv/bin/python (3.11)
1. .venv/bin/python (3.11)
Please select (0):
Expected behavior
PDM should use the interpreter given on the command line. It would be acceptable for it to use the absolute path; it just shouldn't prompt to distinguish two paths to the same interpreter.
Workaround
You can workaround this by using $(realpath .venv/bin/python) or $PWD/.venv/bin/python to pass in the absolute path to begin with.
Environment Information
# Paste the output of `pdm info && pdm info --env` below:
$ pdm info && pdm info --env
PDM version:
2.3.0
Python Interpreter:
/home/brcampbell/src/gitlab-ci/.venv/bin/python (3.11)
Project Root:
/home/brcampbell/src/gitlab-ci
Project Packages:
None
{
"implementation_name": "cpython",
"implementation_version": "3.11.0",
"os_name": "posix",
"platform_machine": "x86_64",
"platform_release": "6.0.9-300.fc37.x86_64",
"platform_system": "Linux",
"platform_version": "#1 SMP PREEMPT_DYNAMIC Wed Nov 16 17:36:22 UTC 2022",
"python_full_version": "3.11.0",
"platform_python_implementation": "CPython",
"python_version": "3.11",
"sys_platform": "linux"
}
The text was updated successfully, but these errors were encountered:
This is probably caused by #1524, thanks for the report. As a workaround, you can add -f option to always pick the first item without prompting in any case.
Make sure you run commands with
-v
flag before pasting the output.Steps to reproduce
python -m venv .venv
pdm use --ignore-remembered .venv/bin/python
Actual behavior
PDM prompts, asking to select between the absolute and relative paths to the interpreter. This breaks CI jobs.
Expected behavior
PDM should use the interpreter given on the command line. It would be acceptable for it to use the absolute path; it just shouldn't prompt to distinguish two paths to the same interpreter.
Workaround
You can workaround this by using
$(realpath .venv/bin/python)
or$PWD/.venv/bin/python
to pass in the absolute path to begin with.Environment Information
The text was updated successfully, but these errors were encountered: