Python Tutorial
Let us see how to install python3.8 on fedora 31,
# dnf install python38
Output:
Last metadata expiration check: 0:21:09 ago on Fri 22 Nov 2019 11:21:49 AM EST. Dependencies resolved. ============================================================================================================================================================================= Package Architecture Version Repository Size ============================================================================================================================================================================= Installing: python38 x86_64 3.8.0-1.fc31 updates 18 M Installing dependencies: fontconfig x86_64 2.13.92-3.fc31 fedora 263 k libX11 x86_64 1.6.8-3.fc31 fedora 662 k libX11-common noarch 1.6.8-3.fc31 fedora 153 k libXau x86_64 1.0.9-2.fc31 fedora 31 k libXft x86_64 2.3.3-2.fc31 fedora 64 k libXrender x86_64 0.9.10-10.fc31 fedora 27 k libxcb x86_64 1.13.1-3.fc31 fedora 231 k tcl x86_64 1:8.6.8-2.fc31 fedora 1.1 M tk x86_64 1:8.6.8-1.fc30 fedora 1.5 M Transaction Summary ============================================================================================================================================================================= Install 10 Packages Total download size: 22 M Installed size: 101 M Is this ok [y/N]: y Downloading Packages: (1/10): python38-3.8.0-1.fc31.x86_64.rpm 4.2 MB/s | 18 MB 00:04 (2/10): fontconfig-2.13.92-3.fc31.x86_64.rpm 50 kB/s | 263 kB 00:05 (3/10): libXau-1.0.9-2.fc31.x86_64.rpm 135 kB/s | 31 kB 00:00 (4/10): libXft-2.3.3-2.fc31.x86_64.rpm 142 kB/s | 64 kB 00:00 (5/10): libXrender-0.9.10-10.fc31.x86_64.rpm 114 kB/s | 27 kB 00:00 (6/10): libX11-common-1.6.8-3.fc31.noarch.rpm 57 kB/s | 153 kB 00:02 (7/10): libX11-1.6.8-3.fc31.x86_64.rpm 78 kB/s | 662 kB 00:08 (8/10): libxcb-1.13.1-3.fc31.x86_64.rpm 55 kB/s | 231 kB 00:04 (9/10): tcl-8.6.8-2.fc31.x86_64.rpm 246 kB/s | 1.1 MB 00:04 (10/10): tk-8.6.8-1.fc30.x86_64.rpm 261 kB/s | 1.5 MB 00:06 ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Total 1.3 MB/s | 22 MB 00:16 Running transaction check Transaction check succeeded. Running transaction test Transaction test succeeded. Running transaction Preparing : 1/1 Installing : tcl-1:8.6.8-2.fc31.x86_64 1/10 Installing : fontconfig-2.13.92-3.fc31.x86_64 2/10 Running scriptlet: fontconfig-2.13.92-3.fc31.x86_64 2/10 Installing : libXau-1.0.9-2.fc31.x86_64 3/10 Installing : libxcb-1.13.1-3.fc31.x86_64 4/10 Installing : libX11-common-1.6.8-3.fc31.noarch 5/10 Installing : libX11-1.6.8-3.fc31.x86_64 6/10 Installing : libXrender-0.9.10-10.fc31.x86_64 7/10 Installing : libXft-2.3.3-2.fc31.x86_64 8/10 Running scriptlet: tk-1:8.6.8-1.fc30.x86_64 9/10 Installing : tk-1:8.6.8-1.fc30.x86_64 9/10 Installing : python38-3.8.0-1.fc31.x86_64 10/10 Running scriptlet: python38-3.8.0-1.fc31.x86_64 10/10 Running scriptlet: fontconfig-2.13.92-3.fc31.x86_64 10/10 Verifying : python38-3.8.0-1.fc31.x86_64 1/10 Verifying : fontconfig-2.13.92-3.fc31.x86_64 2/10 Verifying : libX11-1.6.8-3.fc31.x86_64 3/10 Verifying : libX11-common-1.6.8-3.fc31.noarch 4/10 Verifying : libXau-1.0.9-2.fc31.x86_64 5/10 Verifying : libXft-2.3.3-2.fc31.x86_64 6/10 Verifying : libXrender-0.9.10-10.fc31.x86_64 7/10 Verifying : libxcb-1.13.1-3.fc31.x86_64 8/10 Verifying : tcl-1:8.6.8-2.fc31.x86_64 9/10 Verifying : tk-1:8.6.8-1.fc30.x86_64 10/10 Installed: python38-3.8.0-1.fc31.x86_64 fontconfig-2.13.92-3.fc31.x86_64 libX11-1.6.8-3.fc31.x86_64 libX11-common-1.6.8-3.fc31.noarch libXau-1.0.9-2.fc31.x86_64 libXft-2.3.3-2.fc31.x86_64 libXrender-0.9.10-10.fc31.x86_64 libxcb-1.13.1-3.fc31.x86_64 tcl-1:8.6.8-2.fc31.x86_64 tk-1:8.6.8-1.fc30.x86_64 Complete!
Check the python version,
# python -V -bash: python: command not found
May not work python command and may need to use python3.8 command,
# python3.8 -V
Output:
Python 3.8.0
Let us update alias name python for python3.8 in ~/.bashrc file,
# cat .bashrc alias python=python3.8
Run ~/.bashrc,
# source ~/.bashrc
Let's check again version using python command,
# python -V
Output:
Python 3.8.0
Let us also check sample python code in python3.8,
# python Python 3.8.0 (default, Oct 14 2019, 00:00:00) [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.8!!!") Welcome to python3.8!!! >>> exit() #
Linux Tutorial
Privacy Policy | Copyright2020 - All Rights Reserved. | Contact us
| Report website issues in Github
| Facebook page
| Google+ page