LINUX.ORG.RU
ФорумAdmin

Python не запускает PIP, жалуясь на проблемы с SSL

 , ,


0

1

Python 3.9.5, с урла https://github.com/pypa/get-pip скачиваю get-pip.py, а потом его запускаю

root@porteus:~/Downloads# python get-pip.py
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

Какой модуль SSL ему надо добавить и откуда его взять? OS - Porteus, клон Slackware.

Ответ на: комментарий от kto_tama

Еще бы понять, откуда взять все это для Slackware 32bit:

sudo apt install libssl-dev
sudo apt install libncurses5-dev
sudo apt install libsqlite3-dev
sudo apt install libreadline-dev
sudo apt install libtk8.6
sudo apt install libgdm-dev
sudo apt install libdb4o-cil-dev
sudo apt install libpcap-dev
senglory ()
Ответ на: комментарий от anonymous

Ок , забрал PIP оттуда, даже поставил его, теперь с его помощью хочу поставить python-tk

root@porteus:~/Downloads# pip --version
pip 9.0.3 from /usr/lib/python3.9/site-packages/pip-9.0.3-py3.9.egg (python 3.9)



root@porteus:~/Documents# pip install python-tk
pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.
Collecting python-tk
  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/python-tk/
  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/python-tk/
  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/python-tk/
  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/python-tk/
  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/python-tk/
  Could not fetch URL https://pypi.python.org/simple/python-tk/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.python.org', port=443): Max retries exceeded with url: /simple/python-tk/ (Caused by SSLError("Can't connect to HTTPS URL because the SSL module is not available.")) - skipping
  Could not find a version that satisfies the requirement python-tk (from versions: )
No matching distribution found for python-tk

Без всех этих lib* жить не хочет. Откуда тогда их в бинарном виде набрать? На https://slackbuilds.org/result/?search=libncurses5&sv=14.2 ничего не находится.

senglory ()
Ответ на: комментарий от anonymous

Так, скачиваю https://pypi.python.org/packages/3b/15/a5d90ab1a41075e8f0fae334f13452549528f82142b3b9d0c9d86ab7178c/pyOpenSSL-17.5.0.tar.gz, распаковав его, запускаю

root@porteus:~/Downloads/pyOpenSSL-17.5.0# python setup.py build
/usr/lib/python3.9/site-packages/setuptools/dist.py:648: UserWarning: Usage of dash-separated 'build-requires' will not be supported in future versions. Please use the underscore name 'build_requires' instead
  warnings.warn(
/usr/lib/python3.9/site-packages/setuptools/dist.py:648: UserWarning: Usage of dash-separated 'doc-files' will not be supported in future versions. Please use the underscore name 'doc_files' instead
  warnings.warn(
running build
running build_py
creating build
creating build/lib
creating build/lib/OpenSSL
copying src/OpenSSL/tsafe.py -> build/lib/OpenSSL
copying src/OpenSSL/rand.py -> build/lib/OpenSSL
copying src/OpenSSL/SSL.py -> build/lib/OpenSSL
copying src/OpenSSL/__init__.py -> build/lib/OpenSSL
copying src/OpenSSL/debug.py -> build/lib/OpenSSL
copying src/OpenSSL/crypto.py -> build/lib/OpenSSL
copying src/OpenSSL/_util.py -> build/lib/OpenSSL
copying src/OpenSSL/version.py -> build/lib/OpenSSL

Потом запускаю деплой:

root@porteus:~/Downloads/pyOpenSSL-17.5.0# python setup.py install
/usr/lib/python3.9/site-packages/setuptools/dist.py:648: UserWarning: Usage of dash-separated 'build-requires' will not be supported in future versions. Please use the underscore name 'build_requires' instead
  warnings.warn(
/usr/lib/python3.9/site-packages/setuptools/dist.py:648: UserWarning: Usage of dash-separated 'doc-files' will not be supported in future versions. Please use the underscore name 'doc_files' instead
  warnings.warn(
running install
running bdist_egg
running egg_info
writing src/pyOpenSSL.egg-info/PKG-INFO
writing dependency_links to src/pyOpenSSL.egg-info/dependency_links.txt
writing requirements to src/pyOpenSSL.egg-info/requires.txt
writing top-level names to src/pyOpenSSL.egg-info/top_level.txt
warning: the 'license_file' option is deprecated, use 'license_files' instead
adding license file 'LICENSE' (matched pattern 'LICENSE')
reading manifest file 'src/pyOpenSSL.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no previously-included files found matching 'leakcheck'
warning: no previously-included files matching '*.py' found under directory 'leakcheck'
warning: no previously-included files matching '*.pem' found under directory 'leakcheck'
warning: no previously-included files matching '*.cert' found under directory 'examples/simple'
warning: no previously-included files matching '*.pkey' found under directory 'examples/simple'
no previously-included directories found matching 'doc/_build'
no previously-included directories found matching '.travis'
no previously-included directories found matching '.mention-bot'
writing manifest file 'src/pyOpenSSL.egg-info/SOURCES.txt'
installing library code to build/bdist.linux-i686/egg
running install_lib
running build_py
creating build/bdist.linux-i686
creating build/bdist.linux-i686/egg
creating build/bdist.linux-i686/egg/OpenSSL
copying build/lib/OpenSSL/tsafe.py -> build/bdist.linux-i686/egg/OpenSSL
copying build/lib/OpenSSL/rand.py -> build/bdist.linux-i686/egg/OpenSSL
copying build/lib/OpenSSL/SSL.py -> build/bdist.linux-i686/egg/OpenSSL
copying build/lib/OpenSSL/__init__.py -> build/bdist.linux-i686/egg/OpenSSL
copying build/lib/OpenSSL/debug.py -> build/bdist.linux-i686/egg/OpenSSL
copying build/lib/OpenSSL/crypto.py -> build/bdist.linux-i686/egg/OpenSSL
copying build/lib/OpenSSL/_util.py -> build/bdist.linux-i686/egg/OpenSSL
copying build/lib/OpenSSL/version.py -> build/bdist.linux-i686/egg/OpenSSL
byte-compiling build/bdist.linux-i686/egg/OpenSSL/tsafe.py to tsafe.cpython-39.pyc
byte-compiling build/bdist.linux-i686/egg/OpenSSL/rand.py to rand.cpython-39.pyc
byte-compiling build/bdist.linux-i686/egg/OpenSSL/SSL.py to SSL.cpython-39.pyc
byte-compiling build/bdist.linux-i686/egg/OpenSSL/__init__.py to __init__.cpython-39.pyc
byte-compiling build/bdist.linux-i686/egg/OpenSSL/debug.py to debug.cpython-39.pyc
byte-compiling build/bdist.linux-i686/egg/OpenSSL/crypto.py to crypto.cpython-39.pyc
byte-compiling build/bdist.linux-i686/egg/OpenSSL/_util.py to _util.cpython-39.pyc
byte-compiling build/bdist.linux-i686/egg/OpenSSL/version.py to version.cpython-39.pyc
creating build/bdist.linux-i686/egg/EGG-INFO
copying src/pyOpenSSL.egg-info/PKG-INFO -> build/bdist.linux-i686/egg/EGG-INFO
copying src/pyOpenSSL.egg-info/SOURCES.txt -> build/bdist.linux-i686/egg/EGG-INFO
copying src/pyOpenSSL.egg-info/dependency_links.txt -> build/bdist.linux-i686/egg/EGG-INFO
copying src/pyOpenSSL.egg-info/requires.txt -> build/bdist.linux-i686/egg/EGG-INFO
copying src/pyOpenSSL.egg-info/top_level.txt -> build/bdist.linux-i686/egg/EGG-INFO
zip_safe flag not set; analyzing archive contents...
creating dist
creating 'dist/pyOpenSSL-17.5.0-py3.9.egg' and adding 'build/bdist.linux-i686/egg' to it
removing 'build/bdist.linux-i686/egg' (and everything under it)
Processing pyOpenSSL-17.5.0-py3.9.egg
Copying pyOpenSSL-17.5.0-py3.9.egg to /usr/lib/python3.9/site-packages
Adding pyOpenSSL 17.5.0 to easy-install.pth file

Installed /usr/lib/python3.9/site-packages/pyOpenSSL-17.5.0-py3.9.egg
Processing dependencies for pyOpenSSL==17.5.0
Searching for six>=1.5.2
Reading https://pypi.org/simple/six/
Download error on https://pypi.org/simple/six/: unknown url type: https -- Some packages may not be found!
Couldn't find index page for 'six' (maybe misspelled?)
Scanning index of all packages (this may take a while)
Reading https://pypi.org/simple/
Download error on https://pypi.org/simple/: unknown url type: https -- Some packages may not be found!
No local packages or working download links found for six>=1.5.2
error: Could not find suitable distribution for Requirement.parse('six>=1.5.2')

Ему что, еще какой-то компонент надо? И как мне определить список всего того, что ему надо перед деплоем, а не в процессе самого деплоя?

senglory ()
Ответ на: комментарий от senglory

Тогда быстрее накатить нормальный , у питона огромное количество модулей и вручную разгребать зависимости дело не благодарное

anonymous ()
Для того чтобы оставить комментарий войдите или зарегистрируйтесь.