-
-
Notifications
You must be signed in to change notification settings - Fork 30.9k
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
Failed to find real location of python.exe
on a RAM disk
#128823
Comments
python.exe
on a RAM disck
python.exe
on a RAM disckpython.exe
on a RAM disk
Hmm, if you're seeing that message, it must mean that we can't If you ignore the message on startup and do |
This is a very common failure mode for IMDISK. It doesn't integrate with the mount manager at all so it's impossible for The documentatiom even has a section on this which suggests getting the NT path then manually looking up the drive letter: https://learn.microsoft.com/en-us/windows/win32/api/fileapi/nf-fileapi-getfinalpathnamebyhandlew#remarks
|
import os It printed "r:\python\python313\python.exe" WMIC and PowerShell both see drive R: Drive Snapshot is able to create and restore images as if it were a normal drive. I've used IMDISK with Python 312, 311, and 310 for years with no apparent harm, and certainly no failure to locate messages. This is new with 313. |
Try: print (os.path.realpath (sys.executable, strict=True))
|
Bug report
Bug description:
# Add a code block here, if required
Starting with 13.0 Python I get the warning "failed to find real location of python.exe" but only if I run it from a ram disk, never when i run it from a network share. I wrote an editor in Python back in 2017 and it was very fast except for startup, which took as long as 700 msec. I knew Microsoft C was fast in part because its DLLs were preloaded into memory. One day I was watching a Dave Plummer video on YouTube and he mentioned ram drives which I hadn't thought about since the days of MS-DOS. I found and installed IMDISK on Windows 10, and later Windows 11. The editor, and everything else, runs instantly and I've never had any problems with Python running from a ram disk. So, I'm writing to see if you guys could either make an exception for ram drives, or provide a way to turn off that warning message. Thanks in advance.
CPython versions tested on:
3.13
Operating systems tested on:
Windows
The text was updated successfully, but these errors were encountered: