Install Python 3 in Leap 15.1

I am trying to install Python 3 on Leap 15.1, but not successful.

Can someone please help with exact installation steps and how to open the application after installation, as my knowledge of Linux is very basic?

Python3 is installed by default on your system if you followed a normal desktop installation.

Simply type (in a terminal of any kind):

python3 --version

To verify this. pip3 to install python3 package or use YAST / zypper to install those available already with the basic repositories.

  1. CTRL + ALT + F1
  2. enter: root
  3. enter: root password
  4. zypper in python3
  5. agree to the download
  6. enter: exit
  7. CTRL + ALT + F7

Or use a terminal in your desktop environment and switch to root with the su command.

Or use YaST2 -> Software Manager

how to open the application after installation

Python is a programming language, not an application you open. What are you actually trying to accomplish?

Ah perhaps you meant how do you enter an interactive session.
Simply open a terminal and enter “python3”.

Also check out python3-qtconsole and spyder

https://github.com/jupyter/qtconsole

https://www.spyder-ide.org/

Thanks a lot to all of you. Based on instructions above, I am able to install Python3 successfully on Leap 15.1

FWIW I can recommend the Anaconda Python distribution but be sure to install it in a separate place isolated from the system. Do not add path to any of it’s executables as it will interfere with the system Python and can potentially break the boot process. You have been warned!

Why use it then? Because it is a well contained and well maintained distribution which is also platform independent. Installation of tricky-to-install modules such as Mayavi is a breeze for instance. Anaconda comes in two shapes: full blown Anaconda of which you will probably only use a fraction or Miniconda that you can suit to your needs and install only things that you use.

There is a package in the repos that will enable you to tweak your environment such as PATH on the fly. It’s full name is Environment Modules but in the repos it is called Modules. Using this you can change your environment in a terminal session very easily and it won’t interfere with the system at all. You can even have several sessions going with different environments. Setting up Anaconda as a module is very convenient.

Cheers,
gostal