-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
FileNotFoundError '/bin/sh' with subprocess.py python3crystax #691
Comments
This is the code in both Python 2 and Python 3, and this only happens if you pass |
However , testing this "import sdl2 " I get the same error
|
I don't see how that changes my comment. If Keep in mind that not many people use pysdl2 with python-for-android. This isn't a problem with Kivy apps (unless someone uses Also, note that I haven't closed the issue. I'm not saying this isn't an issue, I'm providing a workaround. |
Thank you for your explanations ! This helps me understand. |
I think this is still a valid bug, until |
There is a workaround for importing sdl2: def _import_sdl2():
""" Bypass find_library and import sdl2 with specified DLL path """
import os
from ctypes import util
os.environ["PYSDL2_DLL_PATH"] = os.path.realpath(os.getcwd() + '/../../lib')
orig_fl = util.find_library
def new_fl(*_, **__):
return None
util.find_library = new_fl
import sdl2
util.find_library = orig_fl
return sdl2
sdl2 = _import_sdl2() It is just monkey patching find_library temporarily, so only the specified environment variable is used. |
the error occurs when a try use subprocess with python3crystax
it works by modifying the file in subprocess.py stdlib.zip
/.local/share/python-for-android/dists/testproject/crystax_python/crystax_python/stdlib.zip
subprocess.py
to
it does not look simple to modify the subprocess.py variables of permanent way by passing it through a script.
The text was updated successfully, but these errors were encountered: