apt install doesn't install python3.6 [closed]

For some reason sudo apt install python3.6 doesn't install anything, even after updating and adding repos from which it should pull from.

$ sudo apt install python3.6
Reading package lists... Done
Building dependency tree
Reading state information... Done
Note, selecting 'python3.6-2to3' for regex 'python3.6'
Note, selecting 'libpython3.6-stdlib' for regex 'python3.6'
0 upgraded, 0 newly installed, 0 to remove and 49 not upgraded.
1

1 Answer

It turns out most people expect you to install via apt, so finding alternative methods of installing python weren't the easiest so I'll document different methods here

Method 1

The first method that worked for a friend running the same distro as me (pop_os) was to escape the period in the apt install command

sudo apt install python3\.6

Method 2

Second method is installing directly without an installation tool

# Install dependancies
$ sudo apt install build-essential checkinstall
$ sudo apt install libreadline-gplv2-dev libncursesw5-dev libssl-dev libsqlite3-dev tk-dev libgdbm-dev libc6-dev libbz2-dev
# Retrieve and unzip package
$ wget
$ tar xvf Python-3.6.0.tar.xz
# Make
$ cd Python-3.6.0/
$ ./configure
$ sudo make altinstall

If you run into any issue makeing, try installing zlib1g via sudo apt-get install zlib1g-dev

You Might Also Like