그누보드6 설치시 채택완료
CentOS7 서버에 설치된 파이썬 버전은 3.11 입니다.
pip3 install -r requirements.txt 을 진행하면
아래와 같은 에러가 출력 되는데 계정에는 SSL 이 설정되어져 있습니다.
Could not fetch URL https://pypi.org/simple/annotated-types/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/annotated-types/ (Caused by SSLError("Can't connect to HTTPS URL because the SSL module is not available.")) - skipping
어디를 수정해야 하는지 알려주시면 감사하겠습니다.
테스트 중인 사이트는 https://g6.apachezone.com 입니다.
답변 3개
pypi 는 파이썬 패키지를 관리하고 다운받는 사이트입니다.
서버에 pypi 에서 사용하는 인증서가 없을때 해당오류가 생기는데요.
pip 가 오래되었다면 업데이트 해주세요 pip install --upgrade pip
pip 는 파이썬패키지 매니저입니다. (노드 JS 의 NPM 역할)
다시 가상환경에 들어가서 pip install -r requirements.txt 해봅니다.
안되면 방법 2.
리눅스 라면 아래와 같은 명령어를 입력해주세요
curl https://bootstrap.pypa.io/get-pip.py | python
답변에 대한 댓글 4개
curl https://bootstrap.pypa.io/get-pip.py | python 를
curl https://bootstrap.pypa.io/get-pip.py | python3 으로 (파이썬3) 으로 해보세요
파이썬 2가 설치되어 있으면 명령어에 3을 다붙여주셔야됩니다.
시스템에서 쓰니까 2버전은 지우시면 안되고요
[code]
[gsixapac@localhost ~]$ curl https://bootstrap.pypa.io/get-pip.py | python3
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 2573k 100 2573k 0 0 8357k 0 --:--:-- --:--:-- --:--:-- 8381k
Defaulting to user installation because normal site-packages is not writeable
WARNING: pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.
WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.")': /simple/pip/
WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.")': /simple/pip/
WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.")': /simple/pip/
WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.")': /simple/pip/
WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.")': /simple/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("Can't connect to HTTPS URL because the SSL module is not available.")) - skipping
ERROR: Could not find a version that satisfies the requirement pip (from versions: none)
ERROR: No matching distribution found for pip
WARNING: pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.
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("Can't connect to HTTPS URL because the SSL module is not available.")) - skipping
[/code]
--trusted-host pypi.python.org --trusted-host files.pythonhosted.org --trusted-host pypi.org
라고 ssl 주소 신뢰한다는 옵션을 붙여야된다고 합니다.
pip3 install -r requirements.txt --trusted-host pypi.python.org --trusted-host files.pythonhosted.org --trusted-host pypi.org
를 해보세요
댓글을 작성하려면 로그인이 필요합니다.
Command Line
</p>
<p>pip install --trusted-host pypi.org --trusted-host pypi.python.org --trusted-host files.pythonhosted.org [module]</p>
<p>
pip Config
</p>
<p>[global] trusted-host = pypi.python.org pypi.org files.pythonhosted.org</p>
<p>
답변에 대한 댓글 2개
전역 수정이라 수정하면 일일이 안붙여도 되긴하는군요
댓글을 작성하려면 로그인이 필요합니다.
답변을 작성하려면 로그인이 필요합니다.
로그인
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 2573k 100 2573k 0 0 7837k 0 --:--:-- --:--:-- --:--:-- 7844k
ERROR: This script does not work on Python 2.7 The minimum supported Python version is 3.7. Please use https://bootstrap.pypa.io/pip/2.7/get-pip.py instead.
(venv) [gsixapac@localhost g6]$
[/code]
이런 에러가 나옵니다.
그리고 설치된 pip버전은 22.3.1로 나오네요.
[code]
[gsixapac@localhost ~]$ pip3 --version
pip 22.3.1 from /usr/local/lib/python3.11/site-packages/pip (python 3.11)
[/code]