Welcome!
This is the community forum for my apps Pythonista and Editorial.
For individual support questions, you can also send an email. If you have a very short question or just want to say hello — I'm @olemoritz on Twitter.
Understanding the workload to have Pytonista can support torch and cv2.
-
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:
-
https://forum.omz-software.com/topic/5328/can-pytorch-be-in-pythonista
-- It says that pytorch has distributed specific to each OS and architecture. -
https://pypi.org/project/torch/#description
-- 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? -
https://stackoverflow.com/questions/50167270/how-to-compile-a-whole-python-library-including-dependencies-so-that-it-can-be
-- 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.
-
-
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.
-
@ccc said:
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.
-
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
-
@ccc sorry, I don't understand how to add a new pull request, no issue possible?
-
@ccc @develobile, Pyto's developer, didn't come here for 10 months
-
@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.