I've tried the normal way, sudo apt-get install python3.6, but... well... that didn't work.
So, how would I go about it? (I'd preferably not build it on my own)
I'm using Ubuntu 16.04.
Ubuntu 14.04 and 16.04If you are using Ubuntu 14.04 or 16.04, you can use J Fernyhough's PPA at https://launchpad.net/~jonathonf/+archive/ubuntu/python-3.6:
Alternatively, you can use Felix Krull's deadsnakes PPA at https://launchpad.net/~deadsnakes/+archive/ubuntu/ppa:
Ubuntu 16.10 and 17.04If you are using Ubuntu 16.10 or 17.04, then Python 3.6 is in the universe repository, so you can just run:
After installation for Ubuntu 14.04, 16.04, 16.10 and 17.04To invoke the Python 3.6 interpreter, run Ubuntu 17.10Ubuntu 17.10 already comes with Python 3.6 as default. Just run |
|||||||||||||||||||||
|
|
I would recommend pyenv to solve your woes. It doesn't use Aptitude, and does involve "building it yourself", but it's fully automated. You can build and install a new (or old) version of Python by simply saying Install pyenv
Done! Setting up an environmentTo not touch the system Python (generally a bad idea; OS-level services might be relying on some specific library versions, etc.) make your own environment, it's easy! Even better, no
If you want to clean out your libraries later, you could delete the virtualenv ( |
|||||||||||||||||||||
|
|
An alternative route if you can't find any working repos would be you could try compiling yourself from source. You can find the source code on the download page. Then download and untar the tarball; for example for The process for untarring the tgz file is:
Once you are in the file path the file was unzipped to, run:
And hopefully this should solve the problem for you. |
|||||||||||||
|
|
For Ubuntu 15.10 I installed it successfully using this method:
But I edited this file:
And I changed wily to trusty and then:
|
|||||
|
|
It depends on which version of Ubuntu you are using. Ubuntu 16.10 and Ubuntu 17.04Since Python 3.6 is installed in the universe repository of Ubuntu 16.10 and Ubuntu 17.04, you can directly install python 3.6 from the repository. Just use the commands below:
Ubuntu 16.04There are two ways to install Python3.6 on Ubuntu 16.04
1. Compile and install python 3.6 on Ubuntu 16.04Install the necessary dependencies, download the python 3.6 source code, and build the environment and install
2. Install python 3.6 on Ubuntu 16.04 from PPAYou can install Python 3.6 from PPA using the commands below
If Python 3.6 is correctly installed, you can invoke the python interpreter by running I hope this helps. If you are having any issues, you can check this blog post here. |
|||||||||
|
aptitude, runaptitude search python3– ridgy Dec 28 '16 at 20:13