Upgrading to Python 3.5 and Java 1.8x


Apparently the legit way to do this is to add a repo named after a con man (!) that’s called “deadsnakes”. Yes. And the standard PPA for Java is also not up to date, so you have to add the Oracle one.

Here’s how you do Python 3.5, step by step:

$ sudo add-apt-repository ppa:fkrull/deadsnakes
$ sudo apt-get update
$ sudo apt-get install python3.5

And then change your symlink so that when you invoke python3 on the command line, it starts 3.5 and not 3.4, which is what it will want to do by default–why? because see above. They suck, that’s why.

$ sudo ln -sf /usr/bin/python3.5 /usr/bin/python3

To install Java 1.8, you have to do this (following http://tecadmin.net/install-oracle-java-8-jdk-8-ubuntu-via-ppa/#):

$ sudo add-apt-repository ppa:webupd8team/java 
$ sudo apt-get update 
$ sudo apt-get install oracle-java8-installer 

A beautiful vintage screen will appear; click on “yes” and “okay” and whatever else it asks you to do, watch the dots print to screen, and enjoy your Rubik’s cube while you wait. When it’s over, test the java version as shown below for Mac OS.

Mac OS

Well, at least it’s easy, if inelegant.

Python 3.5: go to http://python.org, click on “Download” for your OS, double click, the end. Test in Terminal that everything is working. It should look like this (if your version of Python is newer than 3.5.1, that’s okay):

$ python3
Python 3.5.1 (v3.5.1:37a07cee5969, DecĀ  5 2015, 21:12:44) 
[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
Type "help", "copyright", "credits" or "license" for more information.

Then quit to return to bash:

>>> quit()

Java: go to http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html, download the Mac OS “Java SE Development Kit”, and double click. If it looks like this (or newer), you’re good:

$ java -version
java version "1.8.0_101"
Java(TM) SE Runtime Environment (build 1.8.0_101-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.101-b13, mixed mode)


Comments Off on Upgrading to Python 3.5 and Java 1.8x

Filed under python3, tutorials

Comments are closed.