Nauč se Python > Kurzy > Beginners course PyLadies > Installation > Python installation > Python installation - 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.

conda installation

For conda installation use this link and choose Anaconda.

Then you have to add full path to /......./Continuum/anaconda3/Scripts (instead of dots there will be something different regarding where you installed it) to your environment variable PATH - try to find out by yourself (but if you will have some troubles contact us). You will know that it's been added successfully by typing into your command line:

conda --help

After successful installation follow how to create virtual environment

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