Skip to content

Instantly share code, notes, and snippets.

@noherczeg
Last active May 26, 2024 21:17
Show Gist options
  • Save noherczeg/fe9db442c5d64f14e5162f924c69630d to your computer and use it in GitHub Desktop.
Save noherczeg/fe9db442c5d64f14e5162f924c69630d to your computer and use it in GitHub Desktop.
# download source https://www.python.org/downloads/release/python-2712/
wget https://www.python.org/ftp/python/2.7.12/Python-2.7.12.tgz
tar -zxvf Python-2.7.12.tgz
cd Python-2.7.12
# install
./configure
make
sudo make install
# crate bin in home if not exists
mkdir ~/bin
ln -s /usr/bin/python2 ~/bin/python
PATH=~/bin:$PATH
# download and install pip
wget https://bootstrap.pypa.io/get-pip.py
sudo python get-pip.py
@vmrfriz
Copy link

vmrfriz commented May 25, 2024

sudo python2 get-pip.py

DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. pip 21.0 will drop support for Python 2.7 in January 2021. More details about Python 2 support in pip can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support pip 21.0 will remove support for this functionality.
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<21.0 (from versions: none)
ERROR: No matching distribution found for pip<21.0

@noherczeg
Copy link
Author

noherczeg commented May 26, 2024

@vmrfriz sorry, I've not been using Manjaro for years, not sure what the current solution is.

I believe the proper way to manage python envs is pyenv:

https://github.com/pyenv/pyenv

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment