Skip to content

Instantly share code, notes, and snippets.

@iscle
Last active November 19, 2025 16:59
Show Gist options
  • Select an option

  • Save iscle/66e946553e74a883b4494d3b6df0ee82 to your computer and use it in GitHub Desktop.

Select an option

Save iscle/66e946553e74a883b4494d3b6df0ee82 to your computer and use it in GitHub Desktop.
Install python2.7 on Ubuntu 23.04 as "python"
wget https://www.python.org/ftp/python/2.7.18/Python-2.7.18.tgz
tar xzf Python-2.7.18.tgz
cd Python-2.7.18
sudo ./configure --enable-optimizations
sudo make altinstall
sudo ln -s "/usr/local/bin/python2.7" "/usr/bin/python"
@iscle
Copy link
Author

iscle commented Oct 26, 2025

Installing it as /usr/bin/python2 is fine. Installing it as /usr/bin/python is crazy and asking-for-trouble.

Many old scripts are asking for this. And I guess if you need to use this gist, is because you're trying to run an old script... Otherwise you'd just use python 3.

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