Understanding the workload to have Pytonista can support torch and cv2.
farabiahmed last edited by
I am currently trying to run my python script on my iOS application. My script is an ML application that consists of training through a given data set in real-time with dependencies on NumPy, cv2, torch, and torch-vision.
I could run the application on Android through Chaquopy successfully. But although several solutions are tried including Pythonista, Pyto, Beeware/briefcase, Kivy, and Pytorch-mobile, none of them worked yet for iOS.
Today, I am having difficulties understanding the reason for Pythonista's lack of support for various python packages that are already available for both desktop and android.
Is it something the source codes should be ported for iPhone CPU`s?
In the near term, should I wait for the required support to be given or continue to dig in?
Here are some references and my other questions as well:
-- It says that pytorch has distributed specific to each OS and architecture.
-- PyPi says that the pytorch needs at least these dependencies:
numpy ninja pyyaml mkl mkl-include setuptools cmake cffi typing_extensions future six requests dataclasses
-- It has been seen from here that http://omz-software.com/pythonista/docs/ios/index.html, only limited subset looks available for Pytonista. Does it mean that path is too long to expect quick resolution?
-- Although it is demoted, Could compiling the python into the static library with dependencies in a way that it can be basically called by a C program?
Thanks in advance.
ccc last edited by ccc
https://pyto.app might be a better way to go given your requirements. This app has not been updated in a long time and Pyto is open source so you can dig in and help.
Pyto might be a better way
Agree but support does not answer at all and discord/Reddit forums are a lot less active than here.
ccc last edited by ccc
Try pull requests at https://github.com/ColdGrub1384/Pyto
@ccc thanks, I'll do it but I have even sent an email to tHe official support, without any acknowledgement
cvp last edited by cvp
@ccc sorry, I don't understand how to add a new pull request, no issue possible?
JonB last edited by
@farabiahmed one important question is whether you have the ability to compile with XCode (do you have a Mac). If so, then it may be possible to compile your own app, in which case you would be able to compile for iOS and include in your own app. The fundamental limitation on iOS (which does not exist on android) is that executable code must be signed by a single developer. This means that no python app on iOS can include external non-pure-py library support unless it is compiled in. Pyto has more active development, and might accept a pull request incorporating such functionality -- or, you could compile on your own and side load if you provision your device as a developer device, I think. Also the Pythonista app template would be an option, but mainly for standalone app (not an editor).
Another option would be to run code in a server (desktop PC) or something like sagecell -- in that case python acts more like a dumb client.