Skip to content

_multiprocessing #1168

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
sm-jalali-f opened this issue Nov 16, 2017 · 3 comments
Closed

_multiprocessing #1168

sm-jalali-f opened this issue Nov 16, 2017 · 3 comments
Labels

Comments

@sm-jalali-f
Copy link

i developed app that user keras library for deep learning.
when run app with buildozer this error occured:
11-16 15:13:08.008 5607 5924 I python : Traceback (most recent call last): 11-16 15:13:08.008 5607 5924 I python : File "/home/mohamad/projects/andcai/readKontor/.buildozer/android/app/main.py", line 6, in <module> 11-16 15:13:08.008 5607 5924 I python : File "/home/mohamad/projects/andcai/readKontor/.buildozer/android/app/digit_detector/classify.py", line 4, in <module> 11-16 15:13:08.009 5607 5924 I python : File "/home/mohamad/projects/andcai/readKontor/.buildozer/android/platform/build/dists/myapp/private/lib/python2.7/site-packages/keras/__init__.py", line 3, in <module> 11-16 15:13:08.009 5607 5924 I python : File "/home/mohamad/projects/andcai/readKontor/.buildozer/android/platform/build/dists/myapp/private/lib/python2.7/site-packages/keras/utils/__init__.py", line 4, in <module> 11-16 15:13:08.009 5607 5924 I python : File "/home/mohamad/projects/andcai/readKontor/.buildozer/android/platform/build/dists/myapp/private/lib/python2.7/site-packages/keras/utils/data_utils.py", line 6, in <module> 11-16 15:13:08.010 5607 5924 I python : File "/home/mohamad/projects/andcai/readKontor/.buildozer/android/platform/build/build/other_builds/python2/armeabi-v7a/python2/python-install/lib/python2.7/multiprocessing/__init__.py", line 84, in <module> 11-16 15:13:08.010 5607 5924 I python : ImportError: No module named _multiprocessing 11-16 15:13:08.043 5607 5924 I python : Python for android ended.

@inclement
Copy link
Member

I think our python build just doesn't support multiprocessing on Android. I think there was a technical reason for this, but I don't remember the details.

@inclement
Copy link
Member

I asked @tshirtman, and he confirmed that multiprocessing is originally missing for technical reasons. There is a little information about it here.

It's possible that multiprocessing could be made to work now, given how much Android has changed over the years, but I don't know what would be involved.

@zanadu123
Copy link

i encounter similar issue when using multiprocessing. when i run app on android, the logcat says:

10-24 21:31:38.558 14600 14649 I python  :  ImportError: cannot import name 'sem_unlink' from '_multiprocessing' (/data/user/0/znd.ccc.cfst/files/app/_python_bundle/modules/_multiprocessing.cpython-37m.so)

and

10-24 21:31:38.588 14600 14649 I python  :    File "/client/.buildozer/android/platform/build/build/other_builds/python3-libffi-openssl-sqlite3/armeabi-v7a__ndk_target_21/python3/Lib/multiprocessing/synchronize.py", line 32, in <module>
10-24 21:31:38.588 14600 14649 I python  :  ImportError: This platform lacks a functioning sem_open implementation, therefore, the required synchronization primitives needed will not function, see issue 3770.

my phone is vivo Y55, android 6.0.1. buildozer version is 0.39

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants