Skip to content

Cannot pdm venv create --with-pip --with uv #3495

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

Closed
1 task done
FedericoStra opened this issue Apr 25, 2025 · 0 comments · Fixed by #3496
Closed
1 task done

Cannot pdm venv create --with-pip --with uv #3495

FedericoStra opened this issue Apr 25, 2025 · 0 comments · Fixed by #3496
Labels
🐛 bug Something isn't working

Comments

@FedericoStra
Copy link
Contributor

Describe the bug

Creating a virtual environment --with-pip and with the uv backend fails.

To reproduce

  1. cd to a fresh empty directory
  2. pdm venv create --with-pip --with uv

Expected Behavior

I expect it to work as it does with --with-pip and the other backends (I tested only venv and virtualenv, not conda).

Environment Information

PDM version:
  2.24.1
Python Interpreter:
  /tmp/pdm-venv-pip-uv/.venv/bin/python (3.13)
Project Root:
  /tmp/pdm-venv-pip-uv
Local Packages:

{
  "implementation_name": "cpython",
  "implementation_version": "3.13.3",
  "os_name": "posix",
  "platform_machine": "x86_64",
  "platform_release": "6.14.2-300.fc42.x86_64",
  "platform_system": "Linux",
  "platform_version": "#1 SMP PREEMPT_DYNAMIC Thu Apr 10 21:50:55 UTC 2025",
  "python_full_version": "3.13.3",
  "platform_python_implementation": "CPython",
  "python_version": "3.13",
  "sys_platform": "linux"
}

Verbose Command Output

mkdir /tmp/pdm-venv-pip-uv && cd $_pdm venv create --with-pip --with uv
INFO: Using uv is experimental and might break due to uv updates.
⠋ Creating virtualenv using uv...error: unexpected argument '/tmp/pdm-venv-pip-uv/.venv' found

Usage: uv venv [OPTIONS] [PATH]

For more information, try '--help'.
[VirtualenvCreateError]: Command '['/home/fstra/.local/bin/uv', 'venv', '-p', '/usr/bin/python',
'--prompt=pdm-venv-pip-uv-3.13', '--seed', 'pip', '/tmp/pdm-venv-pip-uv/.venv']' returned non-zero exit status 2.

Additional Context

No response

Are you willing to submit a PR to fix this bug?

  • Yes, I would like to submit a PR.
@FedericoStra FedericoStra added the 🐛 bug Something isn't working label Apr 25, 2025
FedericoStra added a commit to FedericoStra/pdm that referenced this issue Apr 25, 2025
… `uv`

`uv venv create` takes a `--seed` flag with no parameters.

Fixes pdm-project#3495.
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