joaoventura / pybridge

Reuse Python code in native Android applications
215 stars 56 forks source link

ImportError: No module named 'select' #18

Closed kato-megumi closed 5 years ago

kato-megumi commented 6 years ago

I think the stdlib.zip is lacking some modules. Like select, _ctypes or _socket. This is error log:

File "/data/user/0/com.jventura.pyapp/assets/python/stdlib.zip/platform.py", line 115, in File "/data/user/0/com.jventura.pyapp/assets/python/stdlib.zip/subprocess.py", line 438, in ImportError: No module named 'select'

kabukky commented 5 years ago

Same problem here. Is there a way to get the full stdlib? I guess "select" requires additional native libraries to run?

kabukky commented 5 years ago

Fixed it by copying the select.so from the crystax-sdk. But now I'm getting:

ImportError: The 'appdirs' package is required; normally this is bundled with this package so if you get this warning, consult the packager of your distribution.
kabukky commented 5 years ago

I got it all working by tracking down every package that was missing and then copying it to src/main/assets/python. Works great now :)

ZhangKuixun commented 5 years ago

I have error, not found select in stdlib.zip

Initializing the Python interpreter

-------------------- --PyRun_SimpleString("import bootstrap"); Traceback (most recent call last): File "", line 1, in File "/data/user/0/com.jventura.pyapp/assets/python/bootstrap.py", line 13, in import platform File "/data/user/0/com.jventura.pyapp/assets/python/stdlib.zip/platform.py", line 115, in File "/data/user/0/com.jventura.pyapp/assets/python/stdlib.zip/subprocess.py", line 438, in ImportError: No module named 'select' --------------------

File directory: assets --python ----bootstrap.py ----stdlib.zip

ZhangKuixun commented 5 years ago

@kato-megumi

joaoventura commented 5 years ago

@ZhangKuixun Issues are not meant to be (ab)used for user support like you've been doing so far, so please don't do this here! 👎