Jump to content
Sign in to follow this  
Walid Alg

P4D Android external Python library

Recommended Posts

I want to integrate Python libraries into an Android application in a Delphi environment. In general, to run a Python environment in an Android application, the environment must first be embedded and loaded from within Delphi by selecting Python and the version type. Then, it is eventually integrated with the application and appears in the form of an SO file.

 

What I am trying to do is figure out how to install any external Python library and run it in an Android application using Delphi.

 

I tried installing the MoviePy library through this link: https://github.com/Embarcadero/PythonPackages4Delphi/tree/main/src/MoviePy but it didn’t work. I also tried the attached project: https://github.com/Embarcadero/P4D-Data-Sciences/tree/main/samples/InstallAndImport which includes the PyTorch library. Both have the properties autoImport, autoInstall set to true, and the MoviePy and PyTorch components are set up by default as I stated earlier, with the addition of pythonEngine and pyEmbeddedEnvironment.

 

But neither worked.

 

The problem is the same: the same message appears, "no module named pip".

 

which is that when executing the isImported function, it returns the value false.

1.png

2.png

3.png

Screenshot_20241004-100039.jpg

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×