python 3.4 is installed on the stable release of Ubuntu 14.04. You need to use python3 to use python 3.4. For example, to execute a script file.py, use:
python3 file.py
This will use python 3.4 to interpret your program or you can use the shebang to make it executable. The first line of your program should be:
#!/usr/bin/env python3
and then use chmod +x file.py to assign executable permissions and then run your python script as ./file.py which would use python3 to execute.
If you want python3 to be used when you type python on the terminal, you can use an alias. To add a new alias, open your ~/.bash_aliases file using gedit ~/.bash_aliases and type the following:
alias python=python3
and then save and exit and type
source ~/.bash_aliases
and then you can type
python file.py
to use python3 as your default python interpreter.
No, you don't need IDLE just to use python3 to interpret your programs.
Answer from jobin on askubuntu.compython 3.4 is installed on the stable release of Ubuntu 14.04. You need to use python3 to use python 3.4. For example, to execute a script file.py, use:
python3 file.py
This will use python 3.4 to interpret your program or you can use the shebang to make it executable. The first line of your program should be:
#!/usr/bin/env python3
and then use chmod +x file.py to assign executable permissions and then run your python script as ./file.py which would use python3 to execute.
If you want python3 to be used when you type python on the terminal, you can use an alias. To add a new alias, open your ~/.bash_aliases file using gedit ~/.bash_aliases and type the following:
alias python=python3
and then save and exit and type
source ~/.bash_aliases
and then you can type
python file.py
to use python3 as your default python interpreter.
No, you don't need IDLE just to use python3 to interpret your programs.
Python 3 is installed by default on modern versions of Ubuntu, so you should already have it installed:
python3 -V
To install idle 3:
sudo apt-get install idle-python3.4
Is there an easy way to install Python 3.4 on Ubuntu 12.04?
How do I install python?
Docker: An open source project to pack, ship and run any application as a lightweight containers
How do I completely uninstall python3.6
Videos
I tried downloading and installing the tar.gz but got the error "Ignoring ensurepip failure: pip 1.5.4 requires SSL/TLS." Not sure if there's an easy fix to this or if I'm going about installing it wrong.