9

I'm also using Jupyter and Anaconda, will it break/delete them or any python modules?

1
17

You can try to use this PPA to replace your current python with 3.5:

https://launchpad.net/~fkrull/+archive/ubuntu/deadsnakes

Usage instructions can be found on the linked webpage.

However, I would recommend installing python 3.5 parallel to 3.4 (under /opt for example).

For that you would need to install from source:

wget https://www.python.org/ftp/python/3.5.1/Python-3.5.1.tar.xz
tar xfvJ Python-3.5.1.tar.xz
cd Python-3.5.1
./configure --prefix=/opt/python3.5
make
# To make idle3.5, you need tk's development to produce tkinter
sudo apt-get install tk8.6-dev
sudo make install

Your python 3.5 interpreter will be located in /opt/python3.5/bin/python3.5. Your Integrated DeveLopment Environment is also found in /opt/python3.5/bin/idle3.5.

To facilitate use you can symlink these files to a location on your $PATH like so:

sudo ln -s /opt/python3.5/bin/python3.5 /usr/local/bin/py3.5
sudo ln -s /opt/python3.5/bin/idle3.5 /usr/local/bin/idle3.5

After this, just typing py3.5 from the command line will use python 3.5, while at the same time, python 3.4 will remain untouched, and will not cause any "breakage" on your system. Also, idle3.5 will bring up the IDLE editor with the python 3.5.1 shell.

6
  • What will happen to existing packages? – Ely R Oct 2 '15 at 15:44
  • Using the second method... nothing. You will be able to keep them running just like before, since python 3.4 remains installed and the default interpreter. – Stunts Oct 2 '15 at 20:34
  • 1
    You can try to use this PPA to replace your current python with 3.5 - unfortunately this PPA doesn't include Python 3.5 (there are only obsolete versions) for Wily although there is Python 3.5 for Vivid, Trusty and Precise. – Ivan Dec 23 '15 at 18:24
  • Python 3.5 was added for Vivid, Trusty and Precise just 5 days ago. Maybe something is delaying it for Wily, but it will eventually show up there (it always does). – Stunts Dec 23 '15 at 21:59
  • how to install pip3 to python after installing python 3.5?? – TRomesh Jul 11 '17 at 18:08

Not the answer you're looking for? Browse other questions tagged or ask your own question.