Python, Bash Hassle

Messing up with your default python version which comes with OS might not be a good idea. I learnt it in the hard way.

But, this is a good experience to share with you folks. I will be focusing on three things in this article.

  • What happened and How did I survive?
  • Why you should change python environment?
  • How to create Adjustable Python environment?

Lost your bash?

Imagine you loose your bash just few hours before an important demonstration in a conference. Could there be any better time get to the panic mode?

I was using Ubuntu 16 in where the default python is 3.6+ whereas Ubuntu 18 comes with python 3.7. I needed to direct my python3 to python 3.7.

I accidentally directed both python2 and python3 soft links to python 3.7.
Another common mistake is totally deleting the python links.

In such cases your bash will stop responding and you have no way to do the correct changes using it.

TTY’s are text-only terminals commonly used as a way to get access to the computer to fix things, without actually logging into a GUI terminal.
So, let it be our survivor. By default Ubuntu has 7 tty’s.

Up until Ubuntu 17.10, 1-6 are command line only and 7 runs your X session (your normal desktop).
On Ubuntu 17.10 and newer, it’s GUI login screen on 1, GUI desktop on 2 and command lines on 3-7.
To access them, use this keyboard shortcut:

Ctrl + Alt + F1 (or F3 on 17.10 and newer)

(changing F1 to F1-F6 to access the terminal that you want)

To get back to your GUI session (the normal desktop):

Ctrl + Alt + F7 (or F2 on 17.10 and newer)

Why change python?

Most softwares are now depends on the latest python. Often, we need to update the python version but, by doing that their is a high chance that you’ll break your old implementations. So, best way to overcome this is maintaining python virtual environment according to your projects.

How?

To make the python virtual environment installation easy just clone the following project and run the script.

https://github.com/shabo1984/setup-environment

To have a better understanding, read my previous post at

Now you do not need to worry about python version changes.

4 Comments on "Python, Bash Hassle"

  1. Pretty! This has been a really wonderful post. Many thanks for supplying this info. Faina Chrotoem Pallaton

  2. Thanks for the marvelous posting! I definitely enjoyed reading it, you are a great author. Oralle Gill Goldshell

  3. I am so grateful for your blog. Much thanks again. Cool. Cassondra Hirsch Sunny

  4. I have recently started a website, the information you offer on this site has helped me greatly. Thank you for all of your time & work. Allx Lauritz Aires

Leave a comment

Your email address will not be published.


*