How to ssh and install python on fedora 31 remote host?

How to ssh and install python on fedora 31 server remote host?

$ ssh root@<remote-host-ip-or-name>

Response:

The authenticity of host '<remote-host-ip-or-name> (<remote-host-ip-or-name>)' can't be established.
ECDSA key fingerprint is SHA256:.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '<remote-host-ip-or-name>' (ECDSA) to the list of known hosts.

Enter password,

root@<remote-host-ip-or-name>'s password: <Enter password>
Web console: https://localhost:9090/ or https://<remote-host-ip-or-name>:9090/

Last login: Tue Nov 19 07:08:26 2019

Python installation on fedora 31

Check the python already installed or not.

# python -V

Output:

-bash: python: command not found

Install the python using yum install command.

# yum install python

Output:

Fedora Modular 31 - x86_64                                                                                                                   6.0 kB/s | 8.0 kB     00:01    
Fedora Modular 31 - x86_64 - Updates                                                                                                         6.0 kB/s | 7.6 kB     00:01    
Fedora 31 - x86_64 - Updates                                                                                                                 6.4 kB/s | 7.6 kB     00:01    
Fedora 31 - x86_64                                                                                                                            15 kB/s | 8.1 kB     00:00    
Dependencies resolved.
=============================================================================================================================================================================
 Package                                               Architecture                      Version                                    Repository                          Size
=============================================================================================================================================================================
Installing:
 python-unversioned-command                            noarch                            3.7.5-1.fc31                               updates                             15 k

Transaction Summary
=============================================================================================================================================================================
Install  1 Package

Total download size: 15 k
Installed size: 0  
Is this ok [y/N]: y
Downloading Packages:
python-unversioned-command-3.7.5-1.fc31.noarch.rpm                                                                                           5.0 kB/s |  15 kB     00:02    
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Total                                                                                                                                        3.1 kB/s |  15 kB     00:04     
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Preparing        :                                                                                                                                                     1/1 
  Installing       : python-unversioned-command-3.7.5-1.fc31.noarch                                                                                                      1/1 
  Running scriptlet: python-unversioned-command-3.7.5-1.fc31.noarch                                                                                                      1/1 
  Verifying        : python-unversioned-command-3.7.5-1.fc31.noarch                                                                                                      1/1 

Installed:
  python-unversioned-command-3.7.5-1.fc31.noarch                                                                                                                             

Complete!

Check installed python version,

# python -V

Output:

Python 3.7.5

check whether python works or not in console,

# python
Python 3.7.5 (default, Oct 17 2019, 12:16:48) 
[GCC 9.2.1 20190827 (Red Hat 9.2.1-1)] on linux
Type "help","copyright", "credits" or "license" for more information.
>>> print("Welcome to python3!");
Welcome to python3!
>>> exit()

run first python program,

# cat first-program.py
#/usr/bin/python

print("Welcome to python3!!!")

# python first-program.py
Welcome to python3!!!
#



Python installation

Privacy Policy  |  Copyrightcopyright symbol2020 - All Rights Reserved.  |  Contact us   |  Report website issues in Github   |  Facebook page   |  Google+ page

Email Facebook Google LinkedIn Twitter
^