Embarcadero / PythonEnvironments

Components to simplify the deployment for Python environments for Delphi applications using Python4Delphi.
MIT License
38 stars 14 forks source link

deploy/sample_06_SimpleAndroid is giving me errors #39

Open marcovth opened 1 year ago

marcovth commented 1 year ago

Hello ...

https://github.com/Embarcadero/PythonEnviroments/tree/main/samples/environments/deploy/sample_06_SimpleAndroid is giving me these errors ... Is something missing?

`Build started 17 Jun 2023 08:53:37.


Project "D:\Delphi\PythonEnviroments\samples\environments\deploy\sample_06_SimpleAndroid\SimpleAndroid.dproj" (Make target(s)): Target CreateProjectDirectories: Creating directory ".\Android64\Debug\". Target BuildVersionResource: c:\program files (x86)\embarcadero\studio\22.0\bin\cgrc.exe -c65001 SimpleAndroid.vrc -foSimpleAndroid.res CodeGear Resource Compiler/Binder Version 1.2.2 Copyright (c) 2008-2012 Embarcadero Technologies Inc.

Microsoft (R) Windows (R) Resource Compiler Version 6.0.5724.0

Copyright (C) Microsoft Corporation.  All rights reserved.

Deleting file "SimpleAndroid.vrc".

Target _PasCoreCompile: c:\program files (x86)\embarcadero\studio\22.0\bin\dccaarm64.exe -$O- -$R+ -$Q+ --no-config -M -Q -TX.so -AGenerics.Collections=System.Generics.Collections;Generics.Defaults=System.Generics.Defaults -DDEBUG;PYTHON;PYTHONVER39;;FRAMEWORK_FMX -E.\Android64\Debug -I"c:\program files (x86)\embarcadero\studio\22.0\lib\Android64\debug";"c:\program files (x86)\embarcadero\studio\22.0\lib\Android64\Release";C:\Users\Public\Documents\Embarcadero\Studio\22.0\Dcp\Android64;d:\Delphi\P4D\Source;D:\Delphi\P4D\Source\vcl;D:\Delphi\P4D\Source\fmx;C:\Users\marcovth\Documents\Embarcadero\Studio\22.0\CatalogRepository\Python4Delphi-1.0\Source;C:\Users\marcovth\Documents\Embarcadero\Studio\22.0\CatalogRepository\Python4Delphi-1.0\Source\vcl;C:\Users\marcovth\Documents\Embarcadero\Studio\22.0\CatalogRepository\Python4Delphi-1.0\Source\fmx;C:\Users\marcovth\Documents\Embarcadero\Studio\22.0\CatalogRepository\PythonEnviroments-1.0\src;C:\Users\marcovth\Documents\Embarcadero\Studio\22.0\CatalogRepository\PythonEnviroments-1.0\src\AddOn;C:\Users\marcovth\Documents\Embarcadero\Studio\22.0\CatalogRepository\PythonEnviroments-1.0\src\Embeddable;C:\Users\marcovth\Documents\Embarcadero\Studio\22.0\CatalogRepository\PythonEnviroments-1.0\src\Embeddable\Res;C:\Users\marcovth\Documents\Embarcadero\Studio\22.0\CatalogRepository\PythonEnviroments-1.0\src\Project;C:\Users\marcovth\Documents\Embarcadero\Studio\22.0\CatalogRepository\PythonEnviroments-1.0\src\Project\IDE;C:\Users\marcovth\Documents\Embarcadero\Studio\22.0\CatalogRepository\PythonEnviroments-1.0\src\Tools;C:\Users\marcovth\Documents\Embarcadero\Studio\22.0\CatalogRepository\LightweightPythonWrappers-1.0\src;C:\Users\marcovth\Documents\Embarcadero\Studio\22.0\CatalogRepository\LightweightPythonWrappers-1.0\src\Manager;C:\Users\marcovth\Documents\Embarcadero\Studio\22.0\CatalogRepository\LightweightPythonWrappers-1.0\src\Manager\Cmd;C:\Users\marcovth\Documents\Embarcadero\Studio\22.0\CatalogRepository\LightweightPythonWrappers-1.0\src\Manager\Cmd\Conda;C:\Users\marcovth\Documents\Embarcadero\Studio\22.0\CatalogRepository\LightweightPythonWrappers-1.0\src\Manager\Cmd\Pip;C:\Users\marcovth\Documents\Embarcadero\Studio\22.0\CatalogRepository\LightweightPythonWrappers-1.0\src\Manager\Defs;C:\Users\marcovth\Documents\Embarcadero\Studio\22.0\CatalogRepository\LightweightPythonWrappers-1.0\src\Manager\Defs\Opts;C:\Users\marcovth\Documents\Embarcadero\Studio\22.0\CatalogRepository\LightweightPythonWrappers-1.0\src\Manager\Defs\Opts\Conda;C:\Users\marcovth\Documents\Embarcadero\Studio\22.0\CatalogRepository\LightweightPythonWrappers-1.0\src\Manager\Defs\Opts\Pip;C:\Users\marcovth\Documents\Embarcadero\Studio\22.0\CatalogRepository\LightweightPythonWrappers-1.0\src\Model;C:\Users\marcovth\Documents\Embarcadero\Studio\22.0\CatalogRepository\Delphi4PythonExporter-D11-1.2.1\Source;C:\Users\marcovth\Documents\Embarcadero\Studio\22.0\CatalogRepository\DOSCommand-2021.09-D11\source -LEC:\Users\Public\Documents\Embarcadero\Studio\22.0\Bpl\Android64 -LNC:\Users\Public\Documents\Embarcadero\Studio\22.0\Dcp\Android64 -NU.\Android64\Debug -NSSystem;Xml;Data;Datasnap;Web;Soap; -O"c:\program files (x86)\embarcadero\studio\22.0\lib\Android64\Release";C:\Users\Public\Documents\Embarcadero\Studio\22.0\Dcp\Android64;d:\Delphi\P4D\Source;D:\Delphi\P4D\Source\vcl;D:\Delphi\P4D\Source\fmx;C:\Users\marcovth\Documents\Embarcadero\Studio\22.0\CatalogRepository\Python4Delphi-1.0\Source;C:\Users\marcovth\Documents\Embarcadero\Studio\22.0\CatalogRepository\Python4Delphi-1.0\Source\vcl;C:\Users\marcovth\Documents\Embarcadero\Studio\22.0\CatalogRepository\Python4Delphi-1.0\Source\fmx;C:\Users\marcovth\Documents\Embarcadero\Studio\22.0\CatalogRepository\PythonEnviroments-1.0\src;C:\Users\marcovth\Documents\Embarcadero\Studio\22.0\CatalogRepository\PythonEnviroments-1.0\src\AddOn;C:\Users\marcovth\Documents\Embarcadero\Studio\22.0\CatalogRepository\PythonEnviroments-1.0\src\Embeddable;C:\Users\marcovth\Documents\Embarcadero\Studio\22.0\CatalogRepository\PythonEnviroments-1.0\src\Embeddable\Res;C:\Users\marcovth\Documents\Embarcadero\Studio\22.0\CatalogRepository\PythonEnviroments-1.0\src\Project;C:\Users\marcovth\Documents\Embarcadero\Studio\22.0\CatalogRepository\PythonEnviroments-1.0\src\Project\IDE;C:\Users\marcovth\Documents\Embarcadero\Studio\22.0\CatalogRepository\PythonEnviroments-1.0\src\Tools;C:\Users\marcovth\Documents\Embarcadero\Studio\22.0\CatalogRepository\LightweightPythonWrappers-1.0\src;C:\Users\marcovth\Documents\Embarcadero\Studio\22.0\CatalogRepository\LightweightPythonWrappers-1.0\src\Manager;C:\Users\marcovth\Documents\Embarcadero\Studio\22.0\CatalogRepository\LightweightPythonWrappers-1.0\src\Manager\Cmd;C:\Users\marcovth\Documents\Embarcadero\Studio\22.0\CatalogRepository\LightweightPythonWrappers-1.0\src\Manager\Cmd\Conda;C:\Users\marcovth\Documents\Embarcadero\Studio\22.0\CatalogRepository\LightweightPythonWrappers-1.0\src\Manager\Cmd\Pip;C:\Users\marcovth\Documents\Embarcadero\Studio\22.0\CatalogRepository\LightweightPythonWrappers-1.0\src\Manager\Defs;C:\Users\marcovth\Documents\Embarcadero\Studio\22.0\CatalogRepository\LightweightPythonWrappers-1.0\src\Manager\Defs\Opts;C:\Users\marcovth\Documents\Embarcadero\Studio\22.0\CatalogRepository\LightweightPythonWrappers-1.0\src\Manager\Defs\Opts\Conda;C:\Users\marcovth\Documents\Embarcadero\Studio\22.0\CatalogRepository\LightweightPythonWrappers-1.0\src\Manager\Defs\Opts\Pip;C:\Users\marcovth\Documents\Embarcadero\Studio\22.0\CatalogRepository\LightweightPythonWrappers-1.0\src\Model;C:\Users\marcovth\Documents\Embarcadero\Studio\22.0\CatalogRepository\Delphi4PythonExporter-D11-1.2.1\Source;C:\Users\marcovth\Documents\Embarcadero\Studio\22.0\CatalogRepository\DOSCommand-2021.09-D11\source -R"c:\program files (x86)\embarcadero\studio\22.0\lib\Android64\Release";C:\Users\Public\Documents\Embarcadero\Studio\22.0\Dcp\Android64;d:\Delphi\P4D\Source;D:\Delphi\P4D\Source\vcl;D:\Delphi\P4D\Source\fmx;C:\Users\marcovth\Documents\Embarcadero\Studio\22.0\CatalogRepository\Python4Delphi-1.0\Source;C:\Users\marcovth\Documents\Embarcadero\Studio\22.0\CatalogRepository\Python4Delphi-1.0\Source\vcl;C:\Users\marcovth\Documents\Embarcadero\Studio\22.0\CatalogRepository\Python4Delphi-1.0\Source\fmx;C:\Users\marcovth\Documents\Embarcadero\Studio\22.0\CatalogRepository\PythonEnviroments-1.0\src;C:\Users\marcovth\Documents\Embarcadero\Studio\22.0\CatalogRepository\PythonEnviroments-1.0\src\AddOn;C:\Users\marcovth\Documents\Embarcadero\Studio\22.0\CatalogRepository\PythonEnviroments-1.0\src\Embeddable;C:\Users\marcovth\Documents\Embarcadero\Studio\22.0\CatalogRepository\PythonEnviroments-1.0\src\Embeddable\Res;C:\Users\marcovth\Documents\Embarcadero\Studio\22.0\CatalogRepository\PythonEnviroments-1.0\src\Project;C:\Users\marcovth\Documents\Embarcadero\Studio\22.0\CatalogRepository\PythonEnviroments-1.0\src\Project\IDE;C:\Users\marcovth\Documents\Embarcadero\Studio\22.0\CatalogRepository\PythonEnviroments-1.0\src\Tools;C:\Users\marcovth\Documents\Embarcadero\Studio\22.0\CatalogRepository\LightweightPythonWrappers-1.0\src;C:\Users\marcovth\Documents\Embarcadero\Studio\22.0\CatalogRepository\LightweightPythonWrappers-1.0\src\Manager;C:\Users\marcovth\Documents\Embarcadero\Studio\22.0\CatalogRepository\LightweightPythonWrappers-1.0\src\Manager\Cmd;C:\Users\marcovth\Documents\Embarcadero\Studio\22.0\CatalogRepository\LightweightPythonWrappers-1.0\src\Manager\Cmd\Conda;C:\Users\marcovth\Documents\Embarcadero\Studio\22.0\CatalogRepository\LightweightPythonWrappers-1.0\src\Manager\Cmd\Pip;C:\Users\marcovth\Documents\Embarcadero\Studio\22.0\CatalogRepository\LightweightPythonWrappers-1.0\src\Manager\Defs;C:\Users\marcovth\Documents\Embarcadero\Studio\22.0\CatalogRepository\LightweightPythonWrappers-1.0\src\Manager\Defs\Opts;C:\Users\marcovth\Documents\Embarcadero\Studio\22.0\CatalogRepository\LightweightPythonWrappers-1.0\src\Manager\Defs\Opts\Conda;C:\Users\marcovth\Documents\Embarcadero\Studio\22.0\CatalogRepository\LightweightPythonWrappers-1.0\src\Manager\Defs\Opts\Pip;C:\Users\marcovth\Documents\Embarcadero\Studio\22.0\CatalogRepository\LightweightPythonWrappers-1.0\src\Model;C:\Users\marcovth\Documents\Embarcadero\Studio\22.0\CatalogRepository\Delphi4PythonExporter-D11-1.2.1\Source;C:\Users\marcovth\Documents\Embarcadero\Studio\22.0\CatalogRepository\DOSCommand-2021.09-D11\source -U"c:\program files (x86)\embarcadero\studio\22.0\lib\Android64\debug";"c:\program files (x86)\embarcadero\studio\22.0\lib\Android64\Release";C:\Users\Public\Documents\Embarcadero\Studio\22.0\Dcp\Android64;d:\Delphi\P4D\Source;D:\Delphi\P4D\Source\vcl;D:\Delphi\P4D\Source\fmx;C:\Users\marcovth\Documents\Embarcadero\Studio\22.0\CatalogRepository\Python4Delphi-1.0\Source;C:\Users\marcovth\Documents\Embarcadero\Studio\22.0\CatalogRepository\Python4Delphi-1.0\Source\vcl;C:\Users\marcovth\Documents\Embarcadero\Studio\22.0\CatalogRepository\Python4Delphi-1.0\Source\fmx;C:\Users\marcovth\Documents\Embarcadero\Studio\22.0\CatalogRepository\PythonEnviroments-1.0\src;C:\Users\marcovth\Documents\Embarcadero\Studio\22.0\CatalogRepository\PythonEnviroments-1.0\src\AddOn;C:\Users\marcovth\Documents\Embarcadero\Studio\22.0\CatalogRepository\PythonEnviroments-1.0\src\Embeddable;C:\Users\marcovth\Documents\Embarcadero\Studio\22.0\CatalogRepository\PythonEnviroments-1.0\src\Embeddable\Res;C:\Users\marcovth\Documents\Embarcadero\Studio\22.0\CatalogRepository\PythonEnviroments-1.0\src\Project;C:\Users\marcovth\Documents\Embarcadero\Studio\22.0\CatalogRepository\PythonEnviroments-1.0\src\Project\IDE;C:\Users\marcovth\Documents\Embarcadero\Studio\22.0\CatalogRepository\PythonEnviroments-1.0\src\Tools;C:\Users\marcovth\Documents\Embarcadero\Studio\22.0\CatalogRepository\LightweightPythonWrappers-1.0\src;C:\Users\marcovth\Documents\Embarcadero\Studio\22.0\CatalogRepository\LightweightPythonWrappers-1.0\src\Manager;C:\Users\marcovth\Documents\Embarcadero\Studio\22.0\CatalogRepository\LightweightPythonWrappers-1.0\src\Manager\Cmd;C:\Users\marcovth\Documents\Embarcadero\Studio\22.0\CatalogRepository\LightweightPythonWrappers-1.0\src\Manager\Cmd\Conda;C:\Users\marcovth\Documents\Embarcadero\Studio\22.0\CatalogRepository\LightweightPythonWrappers-1.0\src\Manager\Cmd\Pip;C:\Users\marcovth\Documents\Embarcadero\Studio\22.0\CatalogRepository\LightweightPythonWrappers-1.0\src\Manager\Defs;C:\Users\marcovth\Documents\Embarcadero\Studio\22.0\CatalogRepository\LightweightPythonWrappers-1.0\src\Manager\Defs\Opts;C:\Users\marcovth\Documents\Embarcadero\Studio\22.0\CatalogRepository\LightweightPythonWrappers-1.0\src\Manager\Defs\Opts\Conda;C:\Users\marcovth\Documents\Embarcadero\Studio\22.0\CatalogRepository\LightweightPythonWrappers-1.0\src\Manager\Defs\Opts\Pip;C:\Users\marcovth\Documents\Embarcadero\Studio\22.0\CatalogRepository\LightweightPythonWrappers-1.0\src\Model;C:\Users\marcovth\Documents\Embarcadero\Studio\22.0\CatalogRepository\Delphi4PythonExporter-D11-1.2.1\Source;C:\Users\marcovth\Documents\Embarcadero\Studio\22.0\CatalogRepository\DOSCommand-2021.09-D11\source --libpath:C:\Users\Public\Documents\Embarcadero\Studio\22.0\CatalogRepository\AndroidNDK-21-22.0.48361.3236\android-ndk-r21\sources\cxx-stl\llvm-libc++\libs\arm64-v8a;C:\Users\Public\Documents\Embarcadero\Studio\22.0\CatalogRepository\AndroidNDK-21-22.0.48361.3236\android-ndk-r21\platforms\android-23\arch-arm64\usr\lib --linker:C:\Users\Public\Documents\Embarcadero\Studio\22.0\CatalogRepository\AndroidNDK-21-22.0.48361.3236\android-ndk-r21\toolchains\aarch64-linux-android-4.9\prebuilt\windows-x86_64\aarch64-linux-android\bin\ld.exe -V -VN -NO.\Android64\Debug SimpleAndroid.dpr
D:\Delphi\PythonEnviroments\samples\environments\deploy\sample_06_SimpleAndroid\Unit1.pas(47,33): error E2003: E2003 Undeclared identifier: 'EndSetup' D:\Delphi\PythonEnviroments\samples\environments\deploy\sample_06_SimpleAndroid\Unit1.pas(65,41): error E2003: E2003 Undeclared identifier: 'BeginSetup' D:\Delphi\PythonEnviroments\samples\environments\deploy\sample_06_SimpleAndroid\Unit1.pas(78,6): error E2250: E2250 There is no overloaded version of 'ForceQueue' that can be called with these arguments D:\Delphi\PythonEnviroments\samples\environments\deploy\sample_06_SimpleAndroid\Unit1.pas(86,6): error E2250: E2250 There is no overloaded version of 'ForceQueue' that can be called with these arguments D:\Delphi\PythonEnviroments\samples\environments\deploy\sample_06_SimpleAndroid\Unit1.pas(94,6): error E2250: E2250 There is no overloaded version of 'ForceQueue' that can be called with these arguments D:\Delphi\PythonEnviroments\samples\environments\deploy\sample_06_SimpleAndroid\Unit1.pas(102,6): error E2250: E2250 There is no overloaded version of 'ForceQueue' that can be called with these arguments D:\Delphi\PythonEnviroments\samples\environments\deploy\sample_06_SimpleAndroid\Unit1.pas(112,6): error E2250: E2250 There is no overloaded version of 'ForceQueue' that can be called with these arguments D:\Delphi\PythonEnviroments\samples\environments\deploy\sample_06_SimpleAndroid\Unit1.pas(120,6): error E2250: E2250 There is no overloaded version of 'ForceQueue' that can be called with these arguments D:\Delphi\PythonEnviroments\samples\environments\deploy\sample_06_SimpleAndroid\SimpleAndroid.dpr(6,2): error F2063: F2063 Could not compile used unit 'Unit1.pas' Done building target "_PasCoreCompile" in project "SimpleAndroid.dproj" -- FAILED. Done building project "SimpleAndroid.dproj" -- FAILED. Build FAILED. D:\Delphi\PythonEnviroments\samples\environments\deploy\sample_06_SimpleAndroid\Unit1.pas(47,33): error E2003: E2003 Undeclared identifier: 'EndSetup' D:\Delphi\PythonEnviroments\samples\environments\deploy\sample_06_SimpleAndroid\Unit1.pas(65,41): error E2003: E2003 Undeclared identifier: 'BeginSetup' D:\Delphi\PythonEnviroments\samples\environments\deploy\sample_06_SimpleAndroid\Unit1.pas(78,6): error E2250: E2250 There is no overloaded version of 'ForceQueue' that can be called with these arguments D:\Delphi\PythonEnviroments\samples\environments\deploy\sample_06_SimpleAndroid\Unit1.pas(86,6): error E2250: E2250 There is no overloaded version of 'ForceQueue' that can be called with these arguments D:\Delphi\PythonEnviroments\samples\environments\deploy\sample_06_SimpleAndroid\Unit1.pas(94,6): error E2250: E2250 There is no overloaded version of 'ForceQueue' that can be called with these arguments D:\Delphi\PythonEnviroments\samples\environments\deploy\sample_06_SimpleAndroid\Unit1.pas(102,6): error E2250: E2250 There is no overloaded version of 'ForceQueue' that can be called with these arguments D:\Delphi\PythonEnviroments\samples\environments\deploy\sample_06_SimpleAndroid\Unit1.pas(112,6): error E2250: E2250 There is no overloaded version of 'ForceQueue' that can be called with these arguments D:\Delphi\PythonEnviroments\samples\environments\deploy\sample_06_SimpleAndroid\Unit1.pas(120,6): error E2250: E2250 There is no overloaded version of 'ForceQueue' that can be called with these arguments D:\Delphi\PythonEnviroments\samples\environments\deploy\sample_06_SimpleAndroid\SimpleAndroid.dpr(6,2): error F2063: F2063 Could not compile used unit 'Unit1.pas' 0 Warning(s) 9 Error(s) Time Elapsed 00:00:01.03`

lmbelo commented 1 year ago

It seems we didn't update this sample with latest changes. I will let you know when it's fixed.

marcovth commented 1 year ago

Thanks a lot for your service. Could you add a simple example showing how you actually execute a python file script from Delphi? With Delphi sending (command-line) arguments to a script and capturing the python output for further Delphi processing.

marcovth commented 1 year ago

I found some interesting looking functions here, potentially used to execute python scripts ... https://github.com/Embarcadero/PythonEnviroments/tree/main/src/Tools/ExecCmd

But when I search, I don't find some simple examples.

Priyatham10 commented 1 year ago

We shall try to add this type of example soon. Thanks for the suggestion @marcovth

lmbelo commented 1 year ago

@marcovth, It seems you're using an unsupported version of Delphi. Which version are you using? I just rechecked that sample and it works out. I too saw an unsupported overload of ForceQueue in your error list, what suggest an unsupported version of Delphi.

marcovth commented 1 year ago

Embarcadero® Delphi 11 Version 28.0.48361.3236

marcovth commented 1 year ago

image

marcovth commented 1 year ago

image