Я новичок в Python, и возникают некоторые проблемы. Это скрипт для установки python 3.6.10:
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install zlib1g-dev
apt-get install -y libxml2-dev libxslt1-dev libffi-dev libssl-dev
apt-get install -y libgdal-dev
apt-get install -y tor
apt-get install -y unzip
apt-get install -y s3cmd
apt-get install -y libfreetype6-dev
apt-get install -y pkg-config
apt-get install -y qt5-default
apt-get install -y libqt5webkit5-dev
apt-get install -y texinfo
apt-get install -qy firefox xvfb
apt-get install -y tree
apt-get install -y htop
apt-get install -y chromium-browser
sudo apt-get install build-essential checkinstall
sudo apt-get install libreadline-gplv2-dev libncursesw5-dev libsqlite3-dev tk-dev libgdbm-dev libc6-dev libbz2-dev
cd /opt
sudo wget https://www.python.org/ftp/python/3.6.10/Python-3.6.10.tgz
sudo tar -xvf Python-3.6.10.tgz
cd Python-3.6.10
sudo ./configure --with-ssl
sudo make
sudo make install
sudo apt-get install -y build-essential python-pip python3-pip git
sudo -H pip install --upgrade pip
sudo -H pip3 install --upgrade pip
Установка, кажется, работает правильно, за исключением pip3. Ошибки происходят, и я не нашел решения для этого.
pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.
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/
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/
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/
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/
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
Requirement already up-to-date: pip in /usr/local/lib/python3.6/site-packages (18.1)
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
Как я могу это исправить? И почему это происходит?