0

I am trying to use Kivy on a Mac 10.14.6 to create a Python Android application following the tutorial HERE. When I run the command to build the app

python3 -m buildozer -v android debug

I see the error

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

I have been looking at the pages HERE, HERE and HERE, but the suggested fixes do not work. I neither can install libssl-dev via

brew install libssl-dev  

nor suggested commands in the third page work. For the latter I still get the same error.

It also looks like that kivy/buildozer is trying to install Cython again(???) which does not work:

[INFO]:    -> running bash -c venv/bin/pip install Cython
           working: Could not fetch URL https://pypi.org/simple/pip/: There was a problem confirming the ssl certificate: HT...(and 192 more) Exception in thread background thread for pid 83565:

So what else can I try to fix this problem?

1 Answer 1

1

The solution is:

You have to download the source code for python and compile it with ssl support.

First, you make sure openssl is up-to-date

brew install openssl

Next, you find out the location of ssl

brew --prefix openssl

and use that in the folder where you have the python source code:

./configure CPPFLAGS="-I/usr/local/opt/openssl@3/include" LDFLAGS="-L/usr/local/opt/openssl@3/lib"
make
make install

Then you remove the folder .buildozer and try to recreate your application.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .