I am using Ubuntu 20.10 in a Virtual Box. By default, this version of Ubuntu has Python 3.8 but I managed to install Python 2.7 (I need it for a specific program that does not work with Python 3) and to set it as default. Now, I need to install the wxPython library. If I am not wrong, I first need to install the pip package. However, I read that the newest version (pip 21.0) no longer supports Python 2. So, what can I do to install an older pip version that is compatible with Python 2.7 and that will allow me to obtain the wxPython library?
1 Answer
This guide will show you how to do it (however, has to be updated for python 2.7). These are the necessary steps:
Start by enabling the universe repository:
sudo add-apt-repository universeUpdate the packages index:
sudo apt update Use curl to download the get-pip.py script (for python 2.7):
sudo curl --output get-pip.py Once the repository is enabled, run the script as sudo user with python2 to install pip for Python 2:
sudo python2 get-pip.pyVerify installation by running the following:
pip --version 3