Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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?

like image 533
Sanjit kumar Avatar asked Apr 25 '17 21:04

Sanjit kumar


People also ask

How do I install Python 3.6 9 on Linux?

How do I install Python 3.6 9 on Linux? $ sudo add-apt-repository ppa:deadsnakes/ppa. $ sudo apt update. $ sudo apt install python3.


2 Answers

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 
like image 62
Jobomat Avatar answered Sep 25 '22 06:09

Jobomat


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 
like image 33
Aquarius Avatar answered Sep 21 '22 06:09

Aquarius