Nauč se Python > Kurzy > Python for beginners in Tieto Czech > Installation > Pythonu Installation > Instalace Pythonu - Linux

Python installation on Linux

Installing Python on Linux is actually easy. The only difficult part could be that there are many distributions that needs different installation commands.

Python 3

First chech in your command line if you don't already have python3 installed:

$ python3 --version

If there will appear "Python" and version number (e. g. Python 3.5.2) and the version is higher than 3.4 you are done here so continue with other section tkinter check.

If there will be "Python" and version lower than 3.3, ask coach.

If bash: python3: command not found or something similar will appear you will have to install Python3. Command depends on your distribution.

  • Fedora:
    $ sudo dnf install python3
    
  • Ubuntu:
    $ sudo apt-get install python3
    

If you are using some other distribution we expect that you already know how to install programs. If not try to ask Google.

Tkinter check

Some Linux distros have just some parts of Python. Most of the time there is no tkinter module which will allow us to draw. So first you will have to check if you already have it or not.

$ python3 -m tkinter

If there will appear window everything is fine and you can continue with conda instalation.

If not you will have to install tkinter:

  • Fedora:
    $ sudo dnf install python3-tkinter
    
  • Ubuntu:
    $ sudo apt-get install python3-tk
    

If you have other distro check the package name on Google.


Toto je stránka lekce z kurzu, který probíhá nebo proběhl naživo s instruktorem.