codrsquad / codrsquad/portable-python
requests: Can't connect to HTTPS URL because the SSL module is not available.
Chưa có ai nhận issue này.
- Ngôn ngữ chính
- Python
- Star
- 86
- Fork
- 13
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Mô tả
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?
Hướng dẫn đóng góp
Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Hướng nghiên cứu
Bắt đầu bằng cách tái hiện bản build portable-python được báo cáo cho Python 3.11.7 với -m openssl, sau đó kiểm tra khả năng cung cấp SSL của trình thông dịch được tạo ra trước khi cài đặt requests. So sánh các lệnh HTTP và HTTPS được nêu trong báo cáo và xác định liệu bản build có tạo ra một mô-đun SSL có thể sử dụng hay không; hoàn tất có nghĩa là các yêu cầu HTTPS hoạt động trong trình thông dịch đã được đóng gói.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- python
- Lĩnh vực
- build-system
- Loại issue
- Lỗi
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Cần làm rõ
- Mức phù hợp với người mới
- 25/100