Closed iconberg closed 1 year ago
Isn't this already documented in https://github.com/kivy/buildozer/blob/master/docs/source/installation.rst and https://github.com/kivy/python-for-android/blob/develop/doc/source/troubleshooting.rst ?
Did not look there, i expected the requirements below https://github.com/kivy/buildozer#installing-buildozer-with-target-python-3-default I see other people running in the same errors it would be useful to put the links under an own paragraph "requirments" on the main page.
I am a first time user of buildozer . I have tried to build a basic hello world kivy application (main.py). I have used VMWare 15, Ubuntu 18.04, Python version 3.6, pip3 version 9.0.1. I heve also install all packages dependency for buildozer as below
sudo apt update
sudo apt install -y git zip unzip openjdk-8-jdk python3-pip autoconf libtool pkg-config zlib1g-dev libncurses5-dev libncursesw5-dev libtinfo5 cmake libffi-dev
pip3 install --user --upgrade cython virtualenv
sudo apt install cython
also I install these following packages sudo apt install cython3 sudo apt-get install autoconf sudo apt-get install automake sudo apt-get install g++ sudo apt-get install libtool m4 automake sudo apt-get install lld
then I type this command
buildozer -v android debug
after 15-20 minutes it gives following issues. I heve tried 3-4 time by erasing the entire OS and re installing all packages and rebuilding but still this error occurs:
I have also installed openssl package but still the error persists. and also tries to install ssl package but while installing it is showing error.
Please help me!! Thanks in Advanced...
The Error shown below
[INFO]: Postbuilding android for armeabi-v7a
[INFO]: Postbuilding kivy for armeabi-v7a
[INFO]: # Installing pure Python modules
[INFO]: PYTHON PACKAGE / PROJECT INSTALL STAGE
[INFO]: The requirements (certifi) don't have recipes, attempting to install them with pip
[INFO]: If this fails, it may mean that the module has compiled components and needs a recipe.
[INFO]: -> directory context /home/am-ubuntu/kiv/.buildozer/android/platform/build-armeabi-v7a/build
[INFO]: -> running python3 -m venv venv
[INFO]: Upgrade pip to latest version
[INFO]: -> running bash -c source venv/bin/activate && pip install -U pip
[INFO]: Install Cython in case one of the modules needs it to build
[INFO]: -> running bash -c venv/bin/pip install Cython
Exception in thread background thread for pid 124834:
Traceback (most recent call last):
File "/usr/lib/python3.6/threading.py", line 916, in _bootstrap_inner
self.run()
File "/usr/lib/python3.6/threading.py", line 864, in run
self._target(*self._args, *self._kwargs)
File "/home/am-ubuntu/.local/lib/python3.6/site-packages/sh.py", line 1662, in wrap
fn(args, **kwargs)
File "/home/am-ubuntu/.local/lib/python3.6/site-packages/sh.py", line 2606, in background_thread
handle_exit_code(exit_code)
File "/home/am-ubuntu/.local/lib/python3.6/site-packages/sh.py", line 2304, in fn
return self.command.handle_command_exit_code(exit_code)
File "/home/am-ubuntu/.local/lib/python3.6/site-packages/sh.py", line 877, in handle_command_exit_code
raise exc
sh.ErrorReturnCode_1:
RAN: /bin/bash -c 'venv/bin/pip install Cython'
STDOUT: WARNING: pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available. Collecting Cython WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.")': /simple/cython/ WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.")': /simple/cython/ WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.")': /simple/cython/ WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.")': /simple/cython/ WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.")': /simple/cython/ Could not fetch URL https://pypi.org/simple/cython/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/cython/ (Caused by SSLError("Can't connect to HTTPS URL because the SSL module is not available.")) - skipping ERROR: Could not find a version that satisfies the requirement Cython (from versions: none) ERROR: No matching distribution found for Cython WARNING: pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available. Could not fetch URL https://pypi.org/simple/pip/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/pip/ (Caused by SSLError("Can't connect to HTTPS URL because the SSL module is not available.")) - skipping
STDERR:
Traceback (most recent call last):
File "/usr/lib/python3.6/runpy.py", line 193, in _run_module_as_main
"main", mod_spec)
File "/usr/lib/python3.6/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/home/am-ubuntu/kiv/.buildozer/android/platform/python-for-android/pythonforandroid/toolchain.py", line 1231, in
RAN: /bin/bash -c 'venv/bin/pip install Cython'
STDOUT: WARNING: pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available. Collecting Cython WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.")': /simple/cython/ WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.")': /simple/cython/ WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.")': /simple/cython/ WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.")': /simple/cython/ WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.")': /simple/cython/ Could not fetch URL https://pypi.org/simple/cython/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/cython/ (Caused by SSLError("Can't connect to HTTPS URL because the SSL module is not available.")) - skipping ERROR: Could not find a version that satisfies the requirement Cython (from versions: none) ERROR: No matching distribution found for Cython WARNING: pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available. Could not fetch URL https://pypi.org/simple/pip/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/pip/ (Caused by SSLError("Can't connect to HTTPS URL because the SSL module is not available.")) - skipping
STDERR:
@mamartyacse1 This happens because for some reason, your installed python has no built-in support for SSL. Happend to me.
1) Ensure your current python3 version with python3 -V
.
2) Download the very same version source code.
3) Install the package libopenssl-dev
in your system.
4) Compile the source code of python3 you've downloaded with ./configure && sudo make
4.1) If your main python (python -V
) is python2, then install with sudo make altinstall
, otherwise you can proceed with sudo make install
.
After that, you will not see the SSL problem anymore. Next time create your own thread.
This thread is a suggestion for documentation, that is currently covered, followed by a support thread that has been addressed.
No further work is required here. Closing.
If you installed buildozer for the first time and keep failing building your projekt instead of slove every error step by step make sure following packages are installed:
If you still get error "ModuleNotFoundError: No module named '_ctypes'" try:
buildozer android clean
After that i was finally able to build.
Versions