Why can't I install python3.6-dev on Ubuntu16.04

Sanjit kumar picture Sanjit kumar · Apr 25, 2017 · Viewed 88.6k times · Source

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?

Answer

Jobomat picture Jobomat · Jun 24, 2017

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

Edit: The above PPA has been disabled, see discussion here and the new PPA here . So use the PPA mentioned below to use it:

sudo add-apt-repository ppa:deadsnakes/ppa