-
Notifications
You must be signed in to change notification settings - Fork 808
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
Windows: "uv venv" gives "exit 2" with tox-uv #1636
Comments
Reproducible on Windows with uv 0.1.14 for PyPy 3.9 and 3.10, and CPython 3.13 (via tox-uv 1.4.0): Run python -m tox -e py -rvvv
.pkg: 4423 W remove tox env folder D:\a\termcolor\termcolor\.tox\.pkg [tox\tox_env\api.py:325]
py: 4470 W venv> C:\hostedtoolcache\windows\PyPy\3.10.13\x86\Scripts\uv.exe venv -p 3.10 -v D:\a\termcolor\termcolor\.tox\py\.venv [tox\tox_env\api.py:427]
uv_interpreter::python_query::find_requested_python request=3.10
0.002894s 0ms DEBUG uv_interpreter::python_query Starting interpreter discovery for Python @ `3.10`
0.003287s 0ms DEBUG uv_interpreter::interpreter Probing interpreter info for: C:\hostedtoolcache\windows\PyPy\3.10.13\x86\python3.10.exe
0.132933s 130ms DEBUG uv_interpreter::interpreter Found Python 3.10.13 for: C:\hostedtoolcache\windows\PyPy\3.10.13\x86\python3.10.exe
Using Python 3.10.13 interpreter at: C:\hostedtoolcache\windows\PyPy\3.10.13\x86\python3.10.exe
Creating virtualenv at: D:\a\termcolor\termcolor\.tox\py\.venv
uv::venv::creation
× Failed to create virtualenv
├─▶ failed to copy file from
│ C:\hostedtoolcache\windows\PyPy\3.10.13\x86\Lib\venv\scripts\nt\python.exe
│ to \\?\D:\a\termcolor\termcolor\.tox\py\.venv\Scripts\python.exe
╰─▶ The system cannot find the file specified. (os error 2)
py: 5080 C exit 1 (0.61 seconds) D:\a\termcolor\termcolor> C:\hostedtoolcache\windows\PyPy\3.10.13\x86\Scripts\uv.exe venv -p 3.10 -v D:\a\termcolor\termcolor\.tox\py\.venv pid=6192 [tox\execute\api.py:280]
py: FAIL code 1 (0.67 seconds)
evaluation failed :( (4.67 seconds)
Error: Process completed with exit code 1. https://github.com/hugovk/termcolor/actions/runs/8145079624 CPython 3.8-3.12 pass. |
Thanks, let me see if I can repro with a minimal Python 3.13 run. |
Reproduced here, thanks! #2171 |
First trying to figure out if we're attempting to copy from the wrong directory, or if we're copying the wrong filename. |
@gaborbernat - Do you know if the development builds exclude the |
I figured this out, I think we're supposed to fallback to |
I asked a question about it on discuss: https://discuss.python.org/t/when-should-venv-scripts-nt-python-exe-be-present/47620 |
## Summary In Python 3.13, at least in the current builds, there's no `python.exe`, but there is `venvlauncher.exe`. I've asked here about whether it's intended: https://discuss.python.org/t/when-should-venv-scripts-nt-python-exe-be-present/47620. But there's at least some evidence in CPython [here](https://github.com/python/cpython/blob/d457345bbc6414db0443819290b04a9a4333313d/Lib/venv/__init__.py#L270) that we should fall back to these, and the tests pass. Closes #1636.
FYI @gaborbernat -- The executable names changed in Python 3.13: https://discuss.python.org/t/when-should-venv-scripts-nt-python-exe-be-present/47620/2. I suspect virtualenv won't fail because it's robust to the shims not existing. |
Thanks for the CPython 3.13 fix! This issue is also about PyPy (3.9 and 3.10), does uv need an extra fix there? |
Probably — PyPy isn't officially supported right now, though we'd welcome contributions to help us get there! See #2096 |
Windows
uv 0.1.4
tox-uv 1.2.0
Using tox-uv, and running
python -m tox -e py -vvv
on Windows with CPython 3.8-3.13 and PyPy 3.10 gives an error:It passes on Ubuntu and macOS. I don't have a Windows machine, this is on CI:
https://github.com/hugovk/termcolor/actions/runs/7948092300/job/21697697387
To get the code locally:
Possibly a tox-uv bug?
The text was updated successfully, but these errors were encountered: