Due to my own stupidity, I somehow set the python command to run python 3 instead of the default python 2. How do I undo this? I am on Ubuntu 18.04.
$ python -V
Python 3.7.6
$ python3 -V
Python 3.7.6
You can change the alias python="/usr/bin/python2.7",for example :
alias python="/usr/bin/python3.3"
python
Python 3.3.3 (v3.3.3:c3896275c0f6, Nov 16 2013, 23:39:35)
You can also add this line in your .bashrc file
echo "alias python=/usr/bin/python3.3" >> ~/.bashrc
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With