To avoid "dependency hell" and keep your Python 2.7 environment separate from Python 3, always use a virtual environment. Install virtualenv: pip install virtualenv
Do not install Python 2.7 to learn programming. Do not install it for new projects. Only install it if you are paid to maintain an old system or need to run a specific legacy application. python 2.7 install
sudo add-apt-repository ppa:deadsnakes/ppa sudo apt update sudo apt install python2.7 To avoid "dependency hell" and keep your Python 2