Skip to content
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

pdm init -n does not respect global python with asdf/rtx/pyenv #2436

Closed
baggiponte opened this issue Nov 27, 2023 · 1 comment · Fixed by j178/pdm#1
Closed

pdm init -n does not respect global python with asdf/rtx/pyenv #2436

baggiponte opened this issue Nov 27, 2023 · 1 comment · Fixed by j178/pdm#1
Labels
🐛 bug Something isn't working

Comments

@baggiponte
Copy link
Contributor

Steps to reproduce

Run the following in a fresh dir

pdm init -n --backend=setuptools -vv
Creating a pyproject.toml for PDM...
Run command: ['/Users/luca/.local/share/pipx/venvs/pdm/bin/python', '-m', 'virtualenv', '/Users/luca/Documents/work/xtream/illy/test/.venv', '-p',
'/opt/homebrew/bin/python3.12', '--prompt=test-3.12', '--no-pip', '--no-setuptools', '--no-wheel']
created virtual environment CPython3.12.0.final.0-64 in 28ms
  creator CPython3macOsBrew(dest=/Users/luca/Documents/work/xtream/illy/test/.venv, clear=False, no_vcs_ignore=False, global=False)
  activators BashActivator,CShellActivator,FishActivator,NushellActivator,PowerShellActivator,PythonActivator
Virtualenv is created successfully at /Users/luca/Documents/work/xtream/illy/test/.venv
Project is initialized successfully

Though when I run pdm init the Python environments discovery order is different:

image

I would expect PDM to use the option 0.

Environment Information

# Paste the output of `pdm info && pdm info --env` below:
PDM version:
  2.10.4
Python Interpreter:
  /Users/luca/Documents/work/xtream/illy/test/.venv/bin/python (3.12)
Project Root:
  /Users/luca/Documents/work/xtream/illy/test
Local Packages:

{
  "implementation_name": "cpython",
  "implementation_version": "3.12.0",
  "os_name": "posix",
  "platform_machine": "arm64",
  "platform_release": "22.4.0",
  "platform_system": "Darwin",
  "platform_version": "Darwin Kernel Version 22.4.0: Mon Mar  6 21:00:41 PST 2023; root:xnu-8796.101.5~3/RELEASE_ARM64_T8103",
  "python_full_version": "3.12.0",
  "platform_python_implementation": "CPython",
  "python_version": "3.12",
  "sys_platform": "darwin"
}
@baggiponte baggiponte added the 🐛 bug Something isn't working label Nov 27, 2023
@baggiponte
Copy link
Contributor Author

Very quick, thanks! :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant