Python Forum
Changing Python Versions in Ubuntu 16.04
Thread Rating:
  • 4 Vote(s) - 3 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Changing Python Versions in Ubuntu 16.04
#3
you can make an alias.
metulburr@ubuntu:~$ python -V
Python 2.7.12
metulburr@ubuntu:~$ echo "alias python='python3'" >> .bashrc
metulburr@ubuntu:~$ bash
metulburr@ubuntu:~$ python -V
Python 3.7.2
You can change python3 to whatever version you want to invoke. bash to reset the terminal. Or just open a new terminal.

This may or may not change jupyter notebook. If not, then you will have to go into its settings and change python to python3.6 for it to invoke that version. All IDE's have a method to change which python version it invokes.
Recommended Tutorials:
Reply


Messages In This Thread
RE: Changing Python Versions in Ubuntu 16.04 - by metulburr - Jan-10-2019, 05:45 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Python Launcher (on Windows) only necessary when 2 or more Python versions installed? pstein 1 345 Feb-17-2024, 12:43 PM
Last Post: deanhystad
  Virtual Env changing mysql connection string in python Fredesetes 0 399 Dec-20-2023, 04:06 PM
Last Post: Fredesetes
Question log.exception() without arguments in old Python versions? cthart 5 1,195 Nov-19-2022, 07:09 PM
Last Post: Gribouillis
  Python in Singularity Container on Ubuntu erdemath 0 922 Aug-31-2022, 02:17 PM
Last Post: erdemath
  Python icons in Ubuntu KatManDEW 4 78,441 Aug-12-2022, 08:33 AM
Last Post: rob101
  Changing a string value to a numerical value using python code and a lamda function Led_Zeppelin 6 1,650 Jul-05-2022, 11:29 PM
Last Post: deanhystad
  Python 3.8 on Ubuntu 20.04 erdemath 1 1,384 Mar-07-2022, 09:31 PM
Last Post: Larz60+
  Python versions with libexpat fixes raghupcr 5 2,552 Feb-24-2022, 06:26 PM
Last Post: raghupcr
  Installed versions of Python SamHobbs 5 2,577 Sep-02-2021, 02:28 PM
Last Post: jefsummers
  changing Python files to .exe alok 2 2,252 Jul-20-2021, 02:49 PM
Last Post: alok

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020