Why can't I install python3.6-dev on Ubuntu16.04
I am trying to install Python 3.6-dev
with this command:
sudo apt-get install python3.6-dev
but I'm getting this error:
E: Unable to locate package python3.6-dev
E: Couldn't find any package by glob 'python3.6-dev'
E: Couldn't find any package by regex 'python3.6-dev'
Can anyone help? Why am I getting this error and what is the correct way to install the package?
sudo add-apt-repository ppa:deadsnakes/ppa \
&& sudo apt update \
&& sudo apt install python3.6
Edit: The following PPA has been disabled, see discussion here and the new PPA here . So use the PPA mentioned above instead.
Original answer:
As mentioned by omajid the package is not availible in 16.04. But if you need it in 16.04 you can get it by adding for example the personal package repository of Felix Krull:
sudo add-apt-repository ppa:fkrull/deadsnakes
This ppa worked like a charm on ubuntu 16.04. Posting here for others.
sudo apt-get install software-properties-common
sudo add-apt-repository ppa:deadsnakes/ppa
sudo apt-get update
sudo apt-get install python3.6
For those who tried to install python-3.6 and got same error as that one above. This can help you as well us it helped me fix out the pb.
-
Open terminal then run command to add the PPA:
sudo add-apt-repository ppa:jonathonf/python-3.6
-
Then check updates and install Python 3.6 via commands:
sudo apt-get update
sudo apt-get install python3.6
Now to make sure you had install successufly just run python3.6-v
or python3.6
For more details check here "How to Install Python 3.6.1 in Ubuntu 16.04 LTS"
Note: Linux 16.04 use python v 2.7 as default one if u needa use python 3.6 in your project just set python-3.6 as default version for this project. It's better then use
sudo update-alternatives ...
command then your terminal will vanish :(.
The package is too new. It's not available in the older 16.04 release. It's available in the newer Ubuntu 16.10.