marcocir 2 Posted February 9, 2021 (edited) Hi all. VMware machine with Windows 10 64 bit, Delphi 10.4 Update 1 and plain vanilla Python 3.9 64 bit (but no differences using Anaconda with Python 3.8) I have installed P4D without errors and I can compile, targeting Windows 64 bit platform, any of the demos successfully: when I launch it I always get this (attached) error. Tried suggestions from https://github.com/pyscripter/python4delphi/wiki/FindingPython, , forced dll name, version and path with no success at all, and googled the net: so much time wasted and no way to see a single demo run... Thanks for your help. Marco Edited February 9, 2021 by marcocir Share this post Link to post
Bob Devine 11 Posted February 9, 2021 This is quite a common DLL problem, e.g. see here: https://stackoverflow.com/questions/14361992/dll-load-library-error-code-126 Rather than looking for P4D demos I'd pursue that angle Share this post Link to post
marcocir 2 Posted February 9, 2021 Thank you Bob. Following your answer I deepened and, surprisingly, I've found that all the exe files of the P4D demos was running without a glitch if outside of the 10.4 IDE... After having restarted the IDE all seems OK now. Conclusion: some strange 10.4 IDE's behavior / bug ? Marco Share this post Link to post
Bob Devine 11 Posted February 9, 2021 I doubt it would be the IDE - maybe the DLL was still in memory but I'm not sure if that would cause a 126 error Share this post Link to post
marcocir 2 Posted February 9, 2021 Bob, not sure too, but how do you explain that all demos could be executed outside of the IDE, at the same time ? Share this post Link to post
David Heffernan 2345 Posted February 10, 2021 8 hours ago, Bob Devine said: maybe the DLL was still in memory The IDE is a different process. Share this post Link to post
marcocir 2 Posted February 10, 2021 35 minutes ago, David Heffernan said: The IDE is a different process. Ok, right, the DLL was still in memory of the IDE process, and since DLLs are loaded once per process (my bad), et voit-là the 126 error. Thanks! Share this post Link to post
David Heffernan 2345 Posted February 10, 2021 (edited) 47 minutes ago, marcocir said: Ok, right, the DLL was still in memory of the IDE process, and since DLLs are loaded once per process (my bad), et voit-là the 126 error. Thanks! No. The DLL won't be loaded by the IDE. Why would the IDE load a Python DLL? It has nothing to do with Python. I have no problem debugging my program that hosts the Python DLL. Although I always do it with the 32 bit debugger because I prefer not to have the debugger crash every 30s as happens with the 64 bit debugger. Edited February 10, 2021 by David Heffernan Share this post Link to post