-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
std::process::Command on Windows does not correctly find the program executable #104358
Comments
What's the output of |
|
Ok, so this status means that Rust ran the
The following line seems to be coming from the
The fact In short, Rust is correctly running |
Hmm, interesting. Thanks. I thought I'd managed to eliminate the launcher as the issue, apparently not :-( Yeah, PYLAUNCHER_DEBUG shows the problem is clearly with the launcher. I should have thought to try that. The Python 3.11 launcher is a complete rewrite, and it's had some weird bugs. I thought we'd caught the worst ones though. This looks similar to one I've seen before. Thanks for the help, and my apologies for the incorrect analysis, pinning the blame on rust! I'll close this in favour of python/cpython#99442 |
If I run the following code:
I expect the
C:\Windows\py.exe
program to be run with the argument-V
, which will print the version of Python I have.Instead, this happened:
The code appears to have somehow decided that the executable is
C:\Users\Gustav\AppData\Local\Programs\Python\Python311\py" -V
. I understand from #37519 and #87704 that rust implements its own search for the executable, but I'm not clear why it failed to findC:\Windows\py.exe
.C:\Windows
is the third entry on my PATH, andwhere py
(in the cmd shell) andGet-Command
(in powershell) both find the executable.Meta
rustc --version --verbose
:The text was updated successfully, but these errors were encountered: