2014-04-20 18:09:07 +02:00
|
|
|
Installation
|
|
|
|
============
|
|
|
|
|
2019-09-27 11:10:54 +02:00
|
|
|
Buildozer itself doesn't depend on any library Python >= 3.3.
|
|
|
|
Depending the platform you want to target, you might need more tools installed.
|
|
|
|
Buildozer tries to give you hints or tries to install few things for
|
2014-04-21 14:11:35 +02:00
|
|
|
you, but it doesn't cover every situation.
|
2014-04-20 18:09:07 +02:00
|
|
|
|
|
|
|
First, install the buildozer project with::
|
|
|
|
|
2019-09-27 11:10:54 +02:00
|
|
|
pip3 install --user --upgrade buildozer
|
2014-04-20 18:09:07 +02:00
|
|
|
|
2014-04-21 14:11:35 +02:00
|
|
|
Targeting Android
|
|
|
|
-----------------
|
2014-04-20 18:09:07 +02:00
|
|
|
|
:white_check_mark: Also integration test on macOS
Note the `sed` expression got updated to work for both OS.
Also workaround openssl lib install on macOS, the error was:
```
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
```
2020-05-30 12:52:06 +02:00
|
|
|
Android on Ubuntu 20.04 (64bit)
|
2019-07-05 00:10:22 +02:00
|
|
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
2014-04-21 14:11:35 +02:00
|
|
|
|
2019-07-05 00:10:22 +02:00
|
|
|
(expected to work as well in later version, but only regularly tested in the latest LTS)
|
2018-04-29 23:35:35 +02:00
|
|
|
|
|
|
|
::
|
|
|
|
|
|
|
|
sudo apt update
|
2020-05-17 00:11:01 +02:00
|
|
|
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 libssl-dev
|
2020-05-30 18:32:08 +02:00
|
|
|
pip3 install --user --upgrade Cython==0.29.19 virtualenv # the --user should be removed if you do this in a venv
|
2018-04-29 23:35:35 +02:00
|
|
|
|
2019-07-04 00:24:47 +02:00
|
|
|
# add the following line at the end of your ~/.bashrc file
|
|
|
|
export PATH=$PATH:~/.local/bin/
|
|
|
|
|
|
|
|
|
:white_check_mark: Also integration test on macOS
Note the `sed` expression got updated to work for both OS.
Also workaround openssl lib install on macOS, the error was:
```
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
```
2020-05-30 12:52:06 +02:00
|
|
|
Android on macOS
|
|
|
|
~~~~~~~~~~~~~~~~
|
|
|
|
|
|
|
|
::
|
|
|
|
|
|
|
|
brew install openssl
|
|
|
|
sudo ln -sfn /usr/local/opt/openssl /usr/local/ssl
|
|
|
|
brew install pkg-config autoconf automake
|
|
|
|
python3 -m pip install --user --upgrade Cython==0.29.19 virtualenv # the --user should be removed if you do this in a venv
|
|
|
|
|
|
|
|
# add the following line at the end of your `~/.bashrc` file
|
|
|
|
export PATH=$PATH:~/Library/Python/3.7/bin
|
|
|
|
|
|
|
|
|
2019-07-04 00:24:47 +02:00
|
|
|
TroubleShooting
|
|
|
|
~~~~~~~~~~~~~~~
|
|
|
|
|
|
|
|
Buildozer stuck on "Installing/updating SDK platform tools if necessary"
|
|
|
|
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
|
|
|
|
|
|
|
Press "y" then enter to continue, the license acceptance system is silently waiting for your input
|
|
|
|
|
|
|
|
|
|
|
|
Aidl not found, please install it.
|
|
|
|
""""""""""""""""""""""""""""""""""
|
|
|
|
|
|
|
|
Buildozer didn't install a necessary package
|
2016-09-12 21:08:55 +02:00
|
|
|
|
|
|
|
::
|
2019-09-27 11:10:54 +02:00
|
|
|
|
2019-07-16 10:17:26 +02:00
|
|
|
~/.buildozer/android/platform/android-sdk/tools/bin/sdkmanager "build-tools;29.0.0"
|
2016-09-12 21:08:55 +02:00
|
|
|
|
2019-07-04 00:24:47 +02:00
|
|
|
Then press "y" then enter to accept the license.
|
2019-07-04 00:28:11 +02:00
|
|
|
|
|
|
|
|
2019-09-27 11:10:54 +02:00
|
|
|
python-for-android related errors
|
|
|
|
"""""""""""""""""""""""""""""""""
|
|
|
|
See the dedicated `p4a troubleshooting documentation
|
|
|
|
<https://python-for-android.readthedocs.io/en/latest/troubleshooting/>`_.
|
|
|
|
|
|
|
|
|
2019-07-04 00:28:11 +02:00
|
|
|
Targeting IOS
|
|
|
|
~~~~~~~~~~~~~
|
|
|
|
|
|
|
|
Install XCode and command line tools (through the AppStore)
|
|
|
|
|
|
|
|
|
|
|
|
Install homebrew (https://brew.sh)
|
|
|
|
|
|
|
|
::
|
|
|
|
|
|
|
|
brew install pkg-config sdl2 sdl2_image sdl2_ttf sdl2_mixer gstreamer autoconf automake
|
|
|
|
|
|
|
|
|
|
|
|
Install pip and virtualenv
|
|
|
|
|
|
|
|
::
|
|
|
|
|
:white_check_mark: Also integration test on macOS
Note the `sed` expression got updated to work for both OS.
Also workaround openssl lib install on macOS, the error was:
```
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
```
2020-05-30 12:52:06 +02:00
|
|
|
python3 -m pip install --user --upgrade pip virtualenv kivy-ios
|