I have Python 2.7.9 and Python 3.4.3 installed in a Ubuntu 15.04 machine. Now I want to upgrade Python 3.4.3 to Python 3.6.1 without affecting the packages which are depended on Python 3.x.x. I have found that Python versions are released as separate package. So, my questions are:
- Can I actually upgrade
Python 3.4.3toPython 3.6.1? - If the answer is no, can I uninstall
Python 3.4.3and installPython 3.6.1without affecting the installed packages? - If the second answer is no, then what will happen if I install
Python 3.6.1usingsudo apt-get install python 3.6.1? Can I usePython 3.6.1without affecting other versions usingPython3.6command in terminal and in virtual environments?
Update
I have installed Python 3.6 from -> https://stackoverflow.com/a/44758621/3129414
Open to terminal window and enter
$ python. This will open python interpretor with v2.7.If your have installed python v3.4 in your system. Then run
$ python3, this will open the python interpretor with v3.4.Yes, python v3.6 can be installed without affecting other versions with the following below steps :
a)
$ wget https://www.python.org/ftp/python/3.6.3/Python-3.6.3.tgzb)
$ tar xvf Python-3.6.3.tgzc)
$ cd Python-3.6.3d)
$ ./configure --enable-optimizationse)
$ make -j8f)
$ sudo make altinstallThen, to run python with v3.6 , run
$ python3.6