Closed edenbd50 closed 4 years ago
Have you try installing all dependency? Because the error appears that it need numpy packages. Try installing numpy packages and update here. Wishing to provide further assistance
Hey there, I have copied all the libraries and dependencies that i mentioned from the python 3.5/Lib, The error stop at the first package it sees, (which was the numpy) Have you implemented external py lib to the stdlib.zip before? Have you put it like me inside site-packages folder inside the zip?
I managed to get other packages working by converting them to bytecode and adding them to another zip file which was then added to sys.path (as stated in the readme).
Have you seen issues #8 and #14 where previous people have wanted to add numpy support? According to the issues, adding numpy is not as straightforward.
Hey JMSS-Unonown, I have tried to convert the packages to bytecodes but it failed.. so I figured that might another way.. Could you explain how you managed to convert and put the other packages ?
Download the following files https://github.com/flatangle/flatlib/blob/master/scripts/build.py https://github.com/flatangle/flatlib/blob/master/scripts/utils.py
Make two folders, one which contained the scripts from above and another containing the packages you want to convert to bytecode (this folder must be named "pkg"), like so:
├───pkg
│ ├───package 1
│ └───package 2
└───scripts
build.py
utils.py
Then open powershell in the scripts folder and run build.py. Hopefully a new folder called build will be created one level up with a zip containing the bytecode.
Although I do not think this will work with numpy as stated in the issue and a recipe is needed to compile it, which can be found here: https://github.com/codelv/conda-mobile/tree/master/android-numpy
Seems like a prebuilt version of numpy for android can be found here https://anaconda.org/codelv/android-numpy/files
I managed to get other packages working by converting them to bytecode and adding them to another zip file which was then added to sys.path (as stated in the readme).
can you please tell me how can we convert them to bytecode and where to add sys.path and how?
Hello, have you solved this problem?
I have a problem here
from PIL import Image
2019-09-06 09:52:02.937 10551-10551/com.jventura.pyapp I/pybridge: File "/data/user/0/com.jventura.pyapp/assets/python/stdlib.zip/PIL/Image.py", line 95, in
2019-09-06 09:52:02.937 10551-10551/com.jventura.pyapp I/pybridge: ImportError: cannot import name '_imaging'
_imaging.pyd file is in the PIL folder.
I put PIL in stdlib.zip Can you help me?
This project now uses the python-for-android toolchain. They seem to have lots of recipes for compiling C/C++-based modules..
https://github.com/kivy/python-for-android/tree/develop/pythonforandroid/recipes
Hey there, My python script uses the following modules:
I've been trying to add some external pip modules to the stdlib.zip When I install packages through pip it goes to:
Needless to say it did not work.
Bottom line, How do I add modules properly to the stdlib.zip?