codrsquad / codrsquad/portable-python
requests: Can't connect to HTTPS URL because the SSL module is not available.
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 86
- Forks
- 13
- PR merge metrics
- No merged PRs in 30d
Description
I use this command to install the python3 by portable-python
yum install python3-pip
pip3 install portable-python
yum install -y libffi libffi-devel python3-devel openssl-devel
yum install -y perl-CPAN
cpan IPC::Cmd
cd /opt/
mkdir portable_with_openssl
cd portable_with_openssl/
portable-python build 3.11.7 -m openssl
mkdir /opt/versions
tar -C /opt/versions/ -xf dist/cpython-3.11.7-linux-x86_64.tar.gz
cd /opt/versions/3.11.7
./bin/python3.11 -mpip install requests
And after import the requests, i can request "http://google.com", but when i request "https://google.com", an error has occurred.
Python 3.11.7 (main, Mar 14 2024, 14:21:08) [GCC 4.8.5 20150623 (Red Hat 4.8.5-44)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>import requests
>>> requests.get("http://google.com")
<Response [200]>
>>> requests.get("https://google.com")
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/opt/versions/3.11.7/lib/python3.11/site-packages/requests/api.py", line 73, in get
return request("get", url, params=params, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/versions/3.11.7/lib/python3.11/site-packages/requests/api.py", line 59, in request
return session.request(method=method, url=url, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/versions/3.11.7/lib/python3.11/site-packages/requests/sessions.py", line 589, in request
resp = self.send(prep, **send_kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/versions/3.11.7/lib/python3.11/site-packages/requests/sessions.py", line 703, in send
r = adapter.send(request, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/versions/3.11.7/lib/python3.11/site-packages/requests/adapters.py", line 486, in send
resp = conn.urlopen(
^^^^^^^^^^^^^
File "/opt/versions/3.11.7/lib/python3.11/site-packages/urllib3/connectionpool.py", line 772, in urlopen
conn = self._get_conn(timeout=pool_timeout)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/versions/3.11.7/lib/python3.11/site-packages/urllib3/connectionpool.py", line 295, in _get_conn
return conn or self._new_conn()
^^^^^^^^^^^^^^^^
File "/opt/versions/3.11.7/lib/python3.11/site-packages/urllib3/connectionpool.py", line 1063, in _new_conn
raise ImportError(
ImportError: Can't connect to HTTPS URL because the SSL module is not available.
Does the requests library only use the SSL module in the system to process HTTPS requests?
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the reported portable-python build for Python 3.11.7 with -m openssl, then inspect the generated interpreter's SSL availability before installing requests. Compare the HTTP and HTTPS commands shown in the report and determine whether the build produces a usable SSL module; done means HTTPS requests work in the packaged interpreter.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100