9

I want to install Python 3.5.1 on my Ubuntu 16.04 LTS. I have been searching but I still can't figure it out. I tried to find Python 3.5.1 in the Software Center but I couldn't find it.

Edit: I actually want to run IDLE 3, the Python IDE for Python 3.

Can someone tell me a step by step instruction on how to install it?

David Foerster
  • 36,264
  • 56
  • 94
  • 147
  • 4
    16.04 comes with Python 3.5.1. Can you try which python3 and python3 --version and give us the outputs? – edwinksl Jun 20 '16 at 17:18
  • If 16.04 comes with Python 3.5.1, how come I can't find the IDLE when searching for it? –  Jun 21 '16 at 17:49
  • Can you first tell us what which python3 say? I want to make sure Python 3 is already on your system. As for your question regarding IDLE, IDLE is not installed by default. There is no reason why Python 3 must come together with IDLE. If you want it, do sudo apt install idle3. – edwinksl Jun 21 '16 at 17:53
  • 1
    which python3 returns /usr/local/bin/python3, python3 --version returns Python 3.5.1 –  Jun 22 '16 at 00:07
  • I tried sudo apt install idle3 and there is an error saying E: Sub-process /usr/bin/dpkg return an error code (1) –  Jun 22 '16 at 00:09
  • I can't resolve the error but I did download IDLE3. How should I fix the error? –  Jun 22 '16 at 00:16
  • Search this site for that error; there are plenty of questions and answers regarding that. If you can't find a solution, feel free to ask a question. – edwinksl Jun 22 '16 at 01:04
  • No problem at all. Enjoy using Ubuntu and Python! – edwinksl Jun 22 '16 at 02:46

1 Answers1

12

Python 3.5.1 is installed on Ubuntu 16.04 by default. You can verify that by running the command python3 --version in a terminal.

Now, IDLE for Python 3 is in the package idle3 and part of the default Python distribution but it's not installed on Ubuntu by default. You can do so with Software Center or your favourite package manager. On the command-line you can run:

sudo apt-get install idle3

If that gives you an error as you say in the comments, please edit your question with the "edit" link below it to include the error messages verbatim (and send me a message in the comments to notify me of the change), or ask a new question with the same information.

David Foerster
  • 36,264
  • 56
  • 94
  • 147