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

Cannot create venv due to missing venvlaunchert_d.exe for Python 3.13td venv on Windows #126497

Closed
XuehaiPan opened this issue Nov 6, 2024 · 1 comment
Labels
3.13 bugs and security fixes OS-windows topic-venv Related to the venv module type-bug An unexpected behavior, bug, or error

Comments

@XuehaiPan
Copy link
Contributor

XuehaiPan commented Nov 6, 2024

Bug report

Bug description:

When Python 3.13 is installed with both Include_debug=1 and Include_freethreaded=1 (i.e. cp313td), there should be a corresponding venvlaunchert_d.exe for it.

python_exe = os.path.join(scripts, f'venvlaunchert{exe_d}.exe')

There is a launcher with no suffix for 3.13, a launcher with t suffix for 3.13t, and a launcher with _d suffix for 3.13d. But there is no launcher with t_d suffix for 3.13td.

Repro:

#  % PanXuehai @ VirtualBox in ~ [21:25:38]
$ pyenv uninstall 3.13.0
pyenv: version '3.13.0' not installed
#  % PanXuehai @ VirtualBox in ~ [21:25:43]
$ C:\Users\PanXuehai\.pyenv\pyenv-win\install_cache\python-3.13.0-amd64.exe /quiet /uninstall | Out-Default
#  % PanXuehai @ VirtualBox in ~ [21:25:47]
$ C:\Users\PanXuehai\.pyenv\pyenv-win\install_cache\python-3.13.0-amd64.exe /quiet SimpleInstall=1 InstallAllUsers=0 Include_dev=1 Include_lib=1 Include_exe=1 Include_pip=1 Include_tools=1 Include_launcher=0 Include_test=0 Include_debug=1 Include_symbols=1 Include_freethreaded=1 TargetDir="C:\Users\PanXuehai\.pyenv\pyenv-win\versions\3.13.0" 2>&1 | Out-Default
#  % PanXuehai @ VirtualBox in ~ [21:27:18]
$ cd C:\Users\PanXuehai\.pyenv\pyenv-win\versions\3.13.0
#  % PanXuehai @ VirtualBox in ~\.pyenv\pyenv-win\versions\3.13.0 on git:master [21:28:14]
$ ls .\Lib\venv\scripts\nt\

   Directory: C:\Users\PanXuehai\.pyenv\pyenv-win\versions\3.13.0\Lib\venv\scripts\nt

activate.bat            deactivate.bat          venvlauncher_d.exe      venvlauncher.exe        venvlauncher.pdb
venvlaunchert_d.pdb     venvlaunchert.exe       venvlaunchert.pdb       venvwlauncher_d.exe     venvwlauncher.exe
venvwlauncher.pdb       venvwlaunchert_d.pdb    venvwlaunchert.exe      venvwlaunchert.pdb

https://github.com/metaopt/optree/actions/runs/11704285076/job/32596414844?pr=172

$ python3.13t_d -m venv venv
Unable to copy 'C:\\Users\\runneradmin\\.pyenv\\pyenv-win\\versions\\3.13.0\\Lib\\venv\\scripts\\nt\\venvlaunchert_d.exe' to 'D:\\a\\optree\\optree\\venv\\Scripts\\python.exe'
Unable to copy 'C:\\Users\\runneradmin\\.pyenv\\pyenv-win\\versions\\3.13.0\\Lib\\venv\\scripts\\nt\\venvlaunchert_d.exe' to 'D:\\a\\optree\\optree\\venv\\Scripts\\python_d.exe'
Unable to copy 'C:\\Users\\runneradmin\\.pyenv\\pyenv-win\\versions\\3.13.0\\Lib\\venv\\scripts\\nt\\venvlaunchert_d.exe' to 'D:\\a\\optree\\optree\\venv\\Scripts\\python3.13t.exe'
Unable to copy 'C:\\Users\\runneradmin\\.pyenv\\pyenv-win\\versions\\3.13.0\\Lib\\venv\\scripts\\nt\\venvlaunchert_d.exe' to 'D:\\a\\optree\\optree\\venv\\Scripts\\python3.13t_d.exe'
Unable to copy 'C:\\Users\\runneradmin\\.pyenv\\pyenv-win\\versions\\3.13.0\\Lib\\venv\\scripts\\nt\\venvwlaunchert_d.exe' to 'D:\\a\\optree\\optree\\venv\\Scripts\\pythonw.exe'
Unable to copy 'C:\\Users\\runneradmin\\.pyenv\\pyenv-win\\versions\\3.13.0\\Lib\\venv\\scripts\\nt\\venvwlaunchert_d.exe' to 'D:\\a\\optree\\optree\\venv\\Scripts\\pythonw_d.exe'
Unable to copy 'C:\\Users\\runneradmin\\.pyenv\\pyenv-win\\versions\\3.13.0\\Lib\\venv\\scripts\\nt\\venvwlaunchert_d.exe' to 'D:\\a\\optree\\optree\\venv\\Scripts\\pythonw3.13t.exe'
Unable to copy 'C:\\Users\\runneradmin\\.pyenv\\pyenv-win\\versions\\3.13.0\\Lib\\venv\\scripts\\nt\\venvwlaunchert_d.exe' to 'D:\\a\\optree\\optree\\venv\\Scripts\\pythonw3.13t_d.exe'
Error: [WinError 2] The system cannot find the file specified
image

CPython versions tested on:

3.13

Operating systems tested on:

Windows

Linked PRs

@XuehaiPan XuehaiPan added the type-bug An unexpected behavior, bug, or error label Nov 6, 2024
@picnixz picnixz added topic-venv Related to the venv module 3.13 bugs and security fixes labels Nov 6, 2024
@XuehaiPan
Copy link
Contributor Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3.13 bugs and security fixes OS-windows topic-venv Related to the venv module type-bug An unexpected behavior, bug, or error
Projects
None yet
Development

No branches or pull requests

4 participants