Локальная установка библеотек Python(Requests, urllib3)
Машина локальная, отлученная от интернет сети. Мне нужно спарсить наш локальный сайт и собрать информацию для отчета. Для реализации поставленной задачи я выбрал beautifulsoup. Для его работы вдруг потребовались библиотеки Request, для url запросов. Скачал поставил и столкнулся с проблемой.
C:\Users\ ......\PycharmProjects\pythonProject1\venv\Scripts\python.exe
C:\Users\ ......\PycharmProjects\pythonProject1\main.py
Traceback (most recent call last): File
"C:\Users\ ......\PycharmProjects\pythonProject1\main.py", line 2, in
<module>
import requests File "C:\Users\ .......\PycharmProjects\pythonProject1\venv\Lib\site-packages\requests-2.28.2-py3.11.egg\requests\__init__.py",
line 43, in <module>
import urllib3 ModuleNotFoundError: No module named 'urllib3'
Устанавливаю urllib3, ей тоже не хочется ставится локально!
(venv) PS C:\Users\ ......\PycharmProjects\pythonProject1py
.\download\urllib3-main\setup.py install
===============================
Unsupported installation method
===============================
This version of urllib3 has dropped support for Python 2.7 and no
longer supports installation with `python setup.py install`.
Please use `python -m pip install .` instead.
Process finished with exit code 1
Посоветуйте пожалуйста, как их установить и заставить работать через локальную установку!?
upd
попытка установки библиотеки urllib3 командой py -m pip install .\download\urllib3-2.0.0a3\
, если это команда предназначена для локальной установки то почему она пытается выйти в интернет и выполнить действие с сертификатами, и что она пытается с ними сделать?
(venv) PS C:\Users\ryzhonkov.ia\PycharmProjects\pythonProject> py -m pip install .\download\urllib3-2.0.0a3\
Processing c:\users\ryzhonkov.ia\pycharmprojects\pythonproject\download\urllib3-2.0.0a3
Installing build dependencies ... error
error: subprocess-exited-with-error
× pip subprocess to install build dependencies did not run successfully.
│ exit code: 1
╰─> [10 lines of output]
WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to ge
t local issuer certificate (_ssl.c:992)'))': /simple/hatchling/
WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to ge
t local issuer certificate (_ssl.c:992)'))': /simple/hatchling/
WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to ge
t local issuer certificate (_ssl.c:992)'))': /simple/hatchling/
WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to ge
t local issuer certificate (_ssl.c:992)'))': /simple/hatchling/
WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to ge
t local issuer certificate (_ssl.c:992)'))': /simple/hatchling/
Could not fetch URL https://pypi.org/simple/hatchling/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/hatchling/ (Caused by SSLError(
SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:992)'))) - skipping
ERROR: Could not find a version that satisfies the requirement hatchling<2,>=1.6.0 (from versions: none)
ERROR: No matching distribution found for hatchling<2,>=1.6.0
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(SSLCertVerif
icationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:992)'))) - skipping
WARNING: There was an error checking the latest version of pip.
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error
× pip subprocess to install build dependencies did not run successfully.
│ exit code: 1
╰─> See above for output.
note: This error originates from a subprocess, and is likely not a problem with pip.
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(SSLCertVerificatio
nError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:992)'))) - skipping
WARNING: There was an error checking the latest version of pip.
(venv) PS C:\Users\ryzhonkov.ia\PycharmProjects\pythonProject>
Установка .whl файла командой py -m pip .\download\request-2.28.2-py3-none-any.whl
опять сертификаты!
(venv) PS C:\Users\ryzhonkov.ia\PycharmProjects> py -m pip .\download\request-2.28.2-py3-none-any.whl
Processing c:\users\ryzhonkov.ia\pycharmprojects\pythonproject\download\requests-2.28.2-py3-none-any.whl
WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get loca
l issuer certificate (_ssl.c:992)'))': /simple/charset-normalizer/
WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get loca
l issuer certificate (_ssl.c:992)'))': /simple/charset-normalizer/
WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get loca
l issuer certificate (_ssl.c:992)'))': /simple/charset-normalizer/
WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get loca
l issuer certificate (_ssl.c:992)'))': /simple/charset-normalizer/
WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get loca
l issuer certificate (_ssl.c:992)'))': /simple/charset-normalizer/
Could not fetch URL https://pypi.org/simple/charset-normalizer/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/charset-normalizer/ (Caused
by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:992)'))) - skipping
ERROR: Could not find a version that satisfies the requirement charset-normalizer<4,>=2 (from requests) (from versions: none)
ERROR: No matching distribution found for charset-normalizer<4,>=2
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(SSLCertVerificatio
nError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:992)'))) - skipping
WARNING: There was an error checking the latest version of pip.