vmishka 0 Posted February 26, 2021 I am having a great deal of difficulty installing Python4Delphi under Delphi 10.4 and I would appreciate some help. I watched Jim McKeeth's YouTube video "Getting Started with Python4Delphi" several times, but with all due respect to Jim, it didn't help me. People who ask basic installation questions want to know step-by-step instructions on how to proceed -- SLOWLY. The person doing the training should not assume that such a person has any knowledge of installing 3rd party components. It would seem that Jim's purpose is to show how quickly and easily he can do something since he already knows how to do it. I used Delphi extensively years ago (huge project 20-25 years ago, smaller project 5 years ago) but didn't have the need to install many 3rd party components, and the ones I did install many years ago were not as complicated as this. I have followed the installation instructions at https://github.com/pyscripter/python4delphi/wiki/Installation. I cloned the repo to D:\Components\P4D using "Git CMD" (not from within the Delphi IDE like Jim seemed to do on his video). I believe that step was successful. Then, as instructed, I added the source subdirectories (D:\Components\P4D\Source, D:\Components\P4D\Source\vcl, and D:\Components\P4D\Source\fmx) to the IDE library path for Windows 64-bit (which is the target I intend to use when I write code). I did not add them to Windows 32-bit at first but did so later even though I only want to build Windows 64-bit programs. As instructed, I found P4DComponentSuite.groupproj in my "D:\Components\P4D\Pacakges\Delphi\Delphi 10.4+" directory and opened it within the Delphi IDE (please see "IDE Screenshot). I believe that I am supposed to build the project at this point (and then perhaps Install?). However, when I right-clicked in the Projects area and chose "Build..." it failed with the error "Required Package DesignIDE not found." It looked to me like something was probably missing in my library path, so I searched my drive for "DesignIDE" and found designide270.bpl in the C:\Program Files (x86)\Embarcader\Studio\21.0\bin folder and designide.dcp in the \win32\release and \win32\debug folders. I am concerned that designide270 somehow refers to Python 2.7 which is not what I want, but that is the only designide*.bpl on my system. I have Python 3.9 on my system and all of the Python libraries that I will be using need Python 3. However, I added the bin, debug, and release folders to both my Windows 64-bit library path and my Windows 32-bit library path. To do it to the Windows 32-bit library path is very confusing to me. I want to build Windows 64-bit projects only. Nothing changed if I try to Build using Windows 64-bit. Thinking that the Delphi IDE might be 32-bit and somehow I need to build this package under 32-bit, I tried that. When I try to build with a target of Windows 32-bit (the error changes to: "Can't load package Python$(Auto).bpl. The system cannot find the file specified." I don't understand the $(Auto) notation. I found Python270.bpl in my "C:\Users\Public\Documents\Embarcadero\Studio\21.0\Bpl" folder and tried adding that directory to the 32-bit library path but I get the same error. Again, I am pretty sure that Python270 refers to Python 2.7 which is not what I want. I have run out of ideas. Would someone familiar with installing Python4Delphi please be so kind as to "talk" me through click-by-click how to successfully install this package so that I can build Windows 64-bit programs where the Python part is Python 3? Thank you. Share this post Link to post
pyscripter 689 Posted February 26, 2021 1 hour ago, vmishka said: I did not add them to Windows 32-bit The design time packages are 32-bit so you need to add the paths to the 32-bit target. The group project contains runtime and designtime packages. You first need to compile/build the runtime packages for target 32-bits. Optionally and only if you want to build 64-bit applications with runtime package, build 64-bit runtime packages: - Python270.bpl - PythonVcl270.bpl - PythonFmx270.bpl Then install the Design time packages (these are always 32-bits) - dclPython270.bpl - dclPythonVcl270.bpl - dclPythonFmx270.bpl Share this post Link to post
vmishka 0 Posted February 27, 2021 (edited) 1 hour ago, pyscripter said: The design time packages are 32-bit so you need to add the paths to the 32-bit target. The group project contains runtime and designtime packages. You first need to compile/build the runtime packages for target 32-bits. Optionally and only if you want to build 64-bit applications with runtime package, build 64-bit runtime packages: - Python270.bpl - PythonVcl270.bpl - PythonFmx270.bpl Then install the Design time packages (these are always 32-bits) - dclPython270.bpl - dclPythonVcl270.bpl - dclPythonFmx270.bpl Thank you, pyscripter. I know that you are the developer and I have great respect for you. I don't want to waste your time, but I am not experienced enough in installing components to do this without click-by-click instructions. I added the folders that were mentioned in the installation wiki to the Windows 32-bit library path. I also added certain Embarcadero Studio folders to the path. Attached are screenshots of my library paths for both Windows 32-bit and Windows 64-bit. I have the Python.dproj - Projects open "P4D ComponentSuite." (see screenshot) I completely removed the 64-bit targets at this point. Every target is Windows 32-bit. Whatever I try to build, e.g., right-click on P4D Component Suite and choose Build all... or right-click on the individual lines that do not contain "dcl" and choose "Build..." I get the same error, every time - "Can't load package Python$(Auto).bpl. The system cannot find the file specified." (Complete Build readout below). At this point, the only specified .bpl file that is on my system is Python270.bpl in the "C:Users\Public\Documents\Embarcadero\Studio\21.0\Bpl" folder. (see screenshot, my search everything would find any file containing both Python and bpl). Please tell me how to proceed step-by-step, click-by-click so that I can install your fine software. Assume that I know absolutely nothing about which files to build in what order, or how to install .bpl files (because in reality, I don't know those things). Thank you. Checking project dependencies... Building Python.dproj (Debug, Win32) brcc32 command line for "Python.vrc" c:\program files (x86)\embarcadero\studio\21.0\bin\cgrc.exe -c65001 "Python.vrc" -foPython.res dcc32 command line for "Python.dpk" c:\program files (x86)\embarcadero\studio\21.0\bin\dcc32.exe -$O- -$W+ --no-config -B -Q -TX.bpl -AGenerics.Collections=System.Generics.Collections; Generics.Defaults=System.Generics.Defaults;WinTypes=Winapi.Windows;WinProcs=Winapi.Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE -DDEBUG -I"c:\program files (x86)\embarcadero\studio\21.0\lib\Win32\release";C:\Users\Lawrence\Documents\Embarcadero\Studio\21.0\Imports;"c:\program files (x86)\embarcadero\studio\21.0\Imports";C:\Users\Public\Documents\Embarcadero\Studio\21.0\Dcp;"c:\program files (x86)\embarcadero\studio\21.0\include"; C:\Users\Lawrence\Documents\Embarcadero\Studio\21.0\CatalogRepository\SynEdit-1.5-Sydney\source;D:\Components\P4D\Source;D:\Components\P4D\Source\vcl; D:\Components\P4D\Source\fmx;"C:\Program Files (x86)\Embarcadero\Studio\21.0\bin";"C:\Program Files (x86)\Embarcadero\Studio\21.0\lib\win32\release"; "C:\Program Files (x86)\Embarcadero\Studio\21.0\lib\win32\debug";C:\Users\Public\Documents\Embarcadero\Studio\21.0\Bpl -LEC:\Users\Public\Documents\Embarcadero\Studio\21.0\Bpl -LNC:\Users\Public\Documents\Embarcadero\Studio\21.0\Dcp -NSData.Win;Datasnap.Win;Web.Win; Soap.Win;Xml.Win;Bde;Vcl;Vcl.Imaging;Vcl.Touch;Vcl.Samples;Vcl.Shell;System;Xml;Data;Datasnap;Web;Soap;DUnitX.Loggers.GUI;Winapi;System.Win; -O"c:\program files (x86)\embarcadero\studio\21.0\lib\Win32\release";C:\Users\Lawrence\Documents\Embarcadero\Studio\21.0\Imports;"c:\program files (x86)\embarcadero\studio\21.0\Imports";C:\Users\Public\Documents\Embarcadero\Studio\21.0\Dcp;"c:\program files (x86)\embarcadero\studio\21.0\include"; C:\Users\Lawrence\Documents\Embarcadero\Studio\21.0\CatalogRepository\SynEdit-1.5-Sydney\source;D:\Components\P4D\Source;D:\Components\P4D\Source\vcl; D:\Components\P4D\Source\fmx;"C:\Program Files (x86)\Embarcadero\Studio\21.0\bin";"C:\Program Files (x86)\Embarcadero\Studio\21.0\lib\win32\release"; "C:\Program Files (x86)\Embarcadero\Studio\21.0\lib\win32\debug";C:\Users\Public\Documents\Embarcadero\Studio\21.0\Bpl -R"c:\program files (x86)\embarcadero\studio\21.0\lib\Win32\release";C:\Users\Lawrence\Documents\Embarcadero\Studio\21.0\Imports;"c:\program files (x86)\embarcadero\studio\21.0\Imports";C:\Users\Public\Documents\Embarcadero\Studio\21.0\Dcp;"c:\program files (x86)\embarcadero\studio\21.0\include"; C:\Users\Lawrence\Documents\Embarcadero\Studio\21.0\CatalogRepository\SynEdit-1.5-Sydney\source;D:\Components\P4D\Source;D:\Components\P4D\Source\vcl; D:\Components\P4D\Source\fmx;"C:\Program Files (x86)\Embarcadero\Studio\21.0\bin";"C:\Program Files (x86)\Embarcadero\Studio\21.0\lib\win32\release"; "C:\Program Files (x86)\Embarcadero\Studio\21.0\lib\win32\debug";C:\Users\Public\Documents\Embarcadero\Studio\21.0\Bpl -U"c:\program files (x86)\embarcadero\studio\21.0\lib\Win32\release";C:\Users\Lawrence\Documents\Embarcadero\Studio\21.0\Imports;"c:\program files (x86)\embarcadero\studio\21.0\Imports";C:\Users\Public\Documents\Embarcadero\Studio\21.0\Dcp;"c:\program files (x86)\embarcadero\studio\21.0\include"; C:\Users\Lawrence\Documents\Embarcadero\Studio\21.0\CatalogRepository\SynEdit-1.5-Sydney\source;D:\Components\P4D\Source;D:\Components\P4D\Source\vcl; D:\Components\P4D\Source\fmx;"C:\Program Files (x86)\Embarcadero\Studio\21.0\bin";"C:\Program Files (x86)\Embarcadero\Studio\21.0\lib\win32\release"; "C:\Program Files (x86)\Embarcadero\Studio\21.0\lib\win32\debug";C:\Users\Public\Documents\Embarcadero\Studio\21.0\Bpl -K00400000 --description:"Python4Delphi - Run-time Engine Package" -NBC:\Users\Public\Documents\Embarcadero\Studio\21.0\Dcp -NHC:\Users\Public\Documents\Embarcadero\Studio\21.0\hpp\Win32 Python.dpk Can't load package Python$(Auto).bpl. The system cannot find the file specified [Fatal Error] Can't load package Python$(Auto).bpl. The system cannot find the file specified Edited February 27, 2021 by vmishka Hit Submit Reply before I was ready Share this post Link to post
pyscripter 689 Posted February 28, 2021 (edited) @vmishkaYou are using Delphi 10.4 (which is the reason for the problems you are facing). You need to upgrade to 10.4.1 or even better to the just released10.4.2. This is a new installation. You need to download the installer from Registered Products Portal (embarcadero.com) Edited February 28, 2021 by pyscripter Share this post Link to post
vmishka 0 Posted February 28, 2021 Thank you pyScripter. I really appreciate your help. I uninstalled 10.4 and installed 10.4.2. Then, I was able to open the groupproj, and with a target of Windows 32-bit, Build All successfully and install dclPython, dclPythonVcl, and dclPythonFmx. I will concentrate on looking at the demo projects. To make doubly sure that I don't mess anything up in the future: To arrange to develop 64-bit Windows applications using Python4Delphi, I can go back to the groupproj, change the target to Windows 64-bit for Python270.bpl, PythonVcl270.bpl, and PythonFmx270.bpl and then build each of those individually (no Build All). If I understand correctly, if that is successful, I am good to go (nothing else to install). Is that correct? Share this post Link to post
pyscripter 689 Posted March 1, 2021 (edited) 18 hours ago, vmishka said: To make doubly sure that I don't mess anything up in the future: To arrange to develop 64-bit Windows applications using Python4Delphi, I can go back to the groupproj, change the target to Windows 64-bit for Python270.bpl, PythonVcl270.bpl, and PythonFmx270.bpl and then build each of those individually (no Build All). If I understand correctly, if that is successful, I am good to go (nothing else to install). Is that correct? No need for any of that, if you are not building applications with run-time packages and most likely you are not. Just change the platform of your project to Win64 and build it. Edited March 1, 2021 by pyscripter Share this post Link to post
misc_bb 7 Posted January 20, 2022 Does this mean that if you are running 10.4, its a must to update to 10.4.1 to use P4D? No workaround? Share this post Link to post
pyscripter 689 Posted January 21, 2022 You can use the MultiInstaller. python4delphi/Install at master · pyscripter/python4delphi (github.com) Share this post Link to post
robertdavis 0 Posted July 18, 2022 (edited) I, too, am having incredible trouble installing Python4Delphi. I've got all the components installed; I can see them and drop them on forms. But when I try to run the application, I always get the error message: [dcc32 Fatal Error] Unit1.pas(9): F2613 Unit 'PythonEngine' not found. The PythonEngine IS ON THE FORM! I suspect now that it's a pathing issue. What can I do to get these to run??? I REALLY need some HELP! Edited July 18, 2022 by robertdavis Share this post Link to post
shineworld 73 Posted July 18, 2022 Check in Options -> Language -> Delphi -> Library if you have: <your_libaries_path>\python4delphi\source <your_libaries_path>\python4delphi\source\vcl <your_libaries_path>\python4delphi\source\fmx 1 Share this post Link to post
robertdavis 0 Posted July 18, 2022 Thank you, kind sir! That was the problem. I can now run the demos in 32 bit mode, but not 64 bit. But that's fine! Share this post Link to post
shineworld 73 Posted July 18, 2022 (edited) You have to check libraries path in "Options -> Language -> Delphi -> Library" for 32 (default folder) and 64 bits: The best thing is to use ALWAYS git-ted sources codes of libraries instead of pre-compiled from Get-it. This leaves you knowledge of where sources are and fastly insert your changes. Edited July 18, 2022 by shineworld Share this post Link to post