Execute the following command sequentially: Root permission is required, and normal users can use sudo to execute the command
[Email protected]:~# add-apt-repository ppa:fkrull/deadsnakes
[Email protected]:~# apt-get Update
[Email protected]:~# apt-get Install python3.5
[Email protected]:~# python
Python 2.7.6 (default, June 22 2015, 17:58:13)
[GCC 4.8.2] on linux2
Type "Help", "copyright", "credits" or "license" for more information.
>>> exit ()
This is installed, but due to the impact of the environment variables, so by default, input Python entered the python2.7.6, input Python3 entered is python3.4, only input python3.5 into python3.5. So we can make the following changes as needed:
[Email protected]:~# ln-s/usr/bin/python3.5/usr/bin/python35
[Email protected]:~# python35
Python 3.5.3 (Default, APR 22 2017, 00:00:00)
[GCC 4.8.4] on Linux
Type "Help", "copyright", "credits" or "license" for more information.
>>>
[Email protected]:~# mv/usr/bin/python3/usr/bin/python34
[Email protected]:~# python34
Python 3.4.3 (default, Oct 14 2015, 20:28:29)
[GCC 4.8.4] on Linux
Type "Help", "copyright", "credits" or "license" for more information.
>>>
Install PIP
[Email protected]:~# wget https://bootstrap.pypa.io/get-pip.py
[Email protected]:~# python35 get-pip.py
[Email protected]:~# pip3 Install Setuptools–upgrade
[Email protected]:~# pip-v
Pip 9.0.1 from/usr/local/lib/python3.5/dist-packages (Python 3.5)
Novice small white beginner python, if there is a mistake, please correct me.
Ubuntu Server 14.04LTS Upgrade Python3.5