Skip to content
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

Add libssl as host installation requirement #2178

Open
mzakharocsc opened this issue May 8, 2020 · 8 comments
Open

Add libssl as host installation requirement #2178

mzakharocsc opened this issue May 8, 2020 · 8 comments

Comments

@mzakharocsc
Copy link

Versions

  • Python: 3.6.9
  • OS: Ubuntu 18.04

Description

Need to install libssl-dev on host prior to building hostpython in order for hostpython to support import ssl and allow pip to download packages from pypi.org that use https://

Host setup requirements for pythonforandroid and buildozer need to be updated to reflect this.

Build error

urllib3.exceptions.SSLError: Can't connect to HTTPS URL because the SSL module is not available.

@AndreMiras
Copy link
Member

Yes you're right. Would you mind to make a PR to solve this?
Options I can think of are (from easiest to hardest):

  1. document it in the trouble shooting guide or/and in the hostpython3 recipe docstring
  2. add warning if libssl dependency is not found during the hostpython building phase
  3. ship hostopenssl recipe

Maybe you have other options in mind

@mzakharocsc
Copy link
Author

Yes you're right. Would you mind to make a PR to solve this?
Options I can think of are (from easiest to hardest):

  1. document it in the trouble shooting guide or/and in the hostpython3 recipe docstring
  2. add warning if libssl dependency is not found during the hostpython building phase
  3. ship hostopenssl recipe

Maybe you have other options in mind

Hey -> thanks -> I actually would have preferred option number 3, however, coming from bitbake/poky world, it seems like a maintenance burden to add more files to support building host/vs target recipes. Why is it not just one single openssl recipe file that can be retargeted depending on what you want? This could be fascilitated with separate depends and hostdepends array that would allow build system to know what are build and what are runtime dependencies.

Sorry for the rant, but as a result, I would probably think that option number 1 would be probably less to maintain -> hence would updating the following pages be enough?

@AndreMiras
Copy link
Member

Yes we can complain as much as we want specially if we provide PR to improve things up.
So yes PRs for any options are welcome.
If you want to go for 1, then I would say https://github.com/kivy/python-for-android/blob/2b33eae/doc/source/troubleshooting.rst

@Sahil-pixel
Copy link
Contributor

I have also same problem ..

@SivaramNalliboyana
Copy link

How can I install libssl

@SivaramNalliboyana
Copy link

Like should I write libssl-dev in my requirments or should I install it separately

@RobertFlatt
Copy link
Contributor

Installed ssl
sudo apt install libssl-dev
But get this error:

RAN: /usr/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

But a manual import of ssl works:

>python3
Python 3.8.2 (default, Apr 27 2020, 15:53:34)
[GCC 9.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
 >>> import ssl
 >>>

any ideas?

@RobertFlatt
Copy link
Contributor

Got it.
I have to reinstall p4a after installing libssl-dev

dbnicholson added a commit to dbnicholson/kolibri-installer-android that referenced this issue Apr 18, 2022
Without this, the host python built by p4a doesn't have the ssl module
and the pip using it falls over trying to download from https URLs. See
kivy/python-for-android#2178.
dbnicholson added a commit to dbnicholson/kolibri-installer-android that referenced this issue Apr 20, 2022
Without this, the host python built by p4a doesn't have the ssl module
and the pip using it falls over trying to download from https URLs. See
kivy/python-for-android#2178.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants