In general, the PPA is added first, but I get an error when I add the PPA:
sudo add-apt-repository ppa:fkrull/deadsnakes
Ubuntu Add-apt-repository:command not found
So let's do it first:
sudo Install python-software-propertiessudoinstall Software-properties-common
After:
sudo add-apt-repository ppa:fkrull/deadsnakessudo apt-get updatesudo Install Python3. 5 sudo CP /usr/bin/python/usr/bin/python_baksudorm /usr/bin/python sudo Ln -s/usr/bin/python3. 5 /usr/bin/python
Again
Python--version
You can do it.
---------------------------------------
As for the PIP, and then search the internet for half a day installation PIP3:
sudo Install Python3-pip
Are not successful, has been an error:
E:sub-process/usr/bin/dpkg returned an error code (1)
It's still not possible to try out a variety of other ways to solve this error:
sudo MV/var/lib/dpkg/Info/var/lib/dpkg/Info. bak//the Info folder is now renamedsudo mkdir/var/lib/dpkg/Info //Create a new info foldersudoapt-Get Updateapt-get-fInstallXXXsudo MV/var/lib/dpkg/Info/*/var/lib/dpkg/info.baksudo rm-rf/var/lib/dpkg/info//delete your new info folder by removing sudo mv/var/lib/dpkg/info.bak/var/lib/ Dpkg/info//Change the previous Info folder back to its name
sudo apt-get update--fix-missingsudo sudo sudoinstall -F
The third kind I didn't try:
for in/usr/share/fonts/x11/* /usr/share/fonts/truetype/*do sudo touch "$i" done
To install using a Python script:
wget https://bootstrap.pypa.io/get-pip.py sudo python3 get-pip.py sudo Install setuptools--upgrade sudoinstall Ipython[all]
Still have an error, when executing the script error.
Then I try to use it directly:
InstallInstall jinja2
have been successful.
Continue looking at the Python version again:
Pip--version
I'm really not sure what I'm going to get back:
1.5. 4 3.5)
This makes me feel as if the pip I'm using now is python3.5 's PIP.
Does that mean python3.5 comes with it?
Then I went into the/usr/lib/directory and found that there are several files about Python:
Python2. 7 Python3python3. 4 Python3. 5
2.7 and 3.4 are self-bringing, and 3.5 should be the one I installed.
There is only one directory inside the Python3:
Dist-packages
There are indeed Pip folders inside.
There are many directories and folders in the other directory.
[Python] Install python3.5 + PIP in Ubuntu environment