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
Scoop Python is not supported yet #2568
Comments
That's strange, it worked just now for me. Maybe a strange form of a bug with DLL dependency caching, but it considered the Nuitka version as part of the key, or so I am thinking. Works for me with 3.11 CPython and 6.5 and 6.6 just fine, maybe it's somehow related to the venv you created, although I think Nuitka-Watch, where this has a record of working with a late 1.9rc with no meaningful changes afterwards, is run in one. |
Can I help somehow? Compilation reports, or a tree of the venv? I install python via scoop now, if that matters:
But I would think that this does not matter once the venv is created (which I do via VS Code). |
Maybe it does. Did you check if Nuitka supports that? You can identify the differences to CPython and make PR to add support for it. First step would be how to identify it and not have |
Not explicitly, but since Nuitka 1.8.6 works fine, I wonder if that should be enough of an indication. I will try again tomorrow: maybe |
This is how I bisected:
And this is the result:
I had to skip a couple of commits close to the end due to this error:
But that's not too bad, I think, given that [52a472d] Standalone: Massive DLL inclusion cleanups looks very related. |
Okay, this is a two-fold issue.
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\Software\Python\PythonCore]
"DisplayName"="Official Python installed with Scoop"
"SupportUrl"="https://www.python.org/"
[HKEY_CURRENT_USER\Software\Python\PythonCore\3.11]
"DisplayName"="Python 3.11 (64-bit)"
"SupportUrl"="https://www.python.org/"
"Version"="3.11.6"
"SysVersion"="3.11"
"SysArchitecture"="64bit"
[HKEY_CURRENT_USER\Software\Python\PythonCore\3.11\Help\Main Python Documentation]
@="C:\\Scoop\\apps\\python311\\3.11.6\\Doc\\python3116.chm"
"DisplayName"="Python 3.11.6 Documentation"
[HKEY_CURRENT_USER\Software\Python\PythonCore\3.11\InstallPath]
@="C:\\Scoop\\apps\\python311\\3.11.6"
"ExecutablePath"="C:\\Scoop\\apps\\python311\\3.11.6\\python.exe"
"WindowedExecutablePath"="C:\\Scoop\\apps\\python311\\3.11.6\\pythonw.exe"
[HKEY_CURRENT_USER\Software\Python\PythonCore\3.11\PythonPath]
@="C:\\Scoop\\apps\\python311\\3.11.6\\Lib\\;C:\\Scoop\\apps\\python311\\3.11.6\\DLLs\\" There is potential to detect this using I will not be able to dig much deeper than this, unfortunately. I can add that my And this path is what I see as Final bit of information: Scoop uses junctions named
I guess nuitka might be susceptible to seeing these paths as different. Indeed:
By adding
to That does not seem to fix the |
Haha, that was the right track! This fixes the issue: diff --git a/nuitka/utils/FileOperations.py b/nuitka/utils/FileOperations.py
index dba50455c..a1934ed78 100644
--- a/nuitka/utils/FileOperations.py
+++ b/nuitka/utils/FileOperations.py
@@ -1121,6 +1121,8 @@ def getExternalUsePath(filename, only_dirname=False):
filename = os.path.abspath(filename)
+ filename = os.path.realpath(filename)
+
if os.name == "nt":
if filename not in _external_use_path_cache:
asked_filename = filename |
Nuitka supports links to the python prefix for a while already, I used to used them myself a lot, for a default between 64 and 32 bits and
Now I am not sure if it's that (will try) or if junctions are not supported by |
btw, if you have a pointer to the commits you needed to skip, that would be nice. I cherish bitseting a lot, and would have be victim of it myself later, so I would want to rectify this as soon as possible. |
So, just making the Python prefix for 3.9 a junction, and clearing all caches, does indeed reproduce the issue, which is absolutely interesting. When googling up, I also noticed that symlinks are not nearly recommendable. I do not want to mix symlink resolution and external use in this way, unless where it's necessary. For the python prefix, it absolutely is, for other things, maybe not so much. In terms of fixit it, I think I need to make compilation reports capable of pointing out the difference between using the junction and not. From my experiment, python_prefix is resolved, but I guess, |
Sure - all that info is in the bisect log in #2568 (comment). |
So, I think I noticed what's going on, the The external use path indeed can be using Junctions, and my suspect is that dependency walker just doesn't handle that, and our function to resolve symlinks is not really good at it, only doing the last level, and not all the way up, which |
Unfortunately, e.g. macOS hates symlinks to be resolved, it will not find its stuff anymore. Need to further refine this to be limited to Windows I guess, since every other system has ideas that symlinks are the real thing. |
Updated factory with a version that limits the symlink resolution for external paths to Windows only. Not so easy to have the "correct" path everywhere. I also rebased develop and main to not have the issue found during your bisect, no change from that. I still intend to put this into 1.9.2 but it feels a bit risky I guess. |
Part of the 1.9.3 release I just made. |
This comment was marked as off-topic.
This comment was marked as off-topic.
@ManPython posting below closed issues is a sure fire way to get ignored |
pip install nuitka
in an activated.venv
bug.py
Then,
nuitka bug.py && bug.dist\bug.exe
:However:
Process Manager says it is looking for
python3.dll
, which is missing inbug.dist
. When building with 1.8.6, that file is present.The text was updated successfully, but these errors were encountered: