No result found.

Outline

  • Intro to Python

  • Windows - Installing Python

  • Linux - Installing Python

  • Compiling Python From Source

  • macOS/Mac OS X - Installing Python

Python - An Installation guide

Nischaya Sharma04 Jul, 2020

Intro to Python

Windows - Installing Python

Linux - Installing Python

        $ lsb_release -a

No LSB modules are available.
Distributor ID:	Ubuntu
Description:	Ubuntu 18.04.4 LTS
Release:	18.04
Codename:	bionic

      
        $ sudo apt-get update
$ sudo apt-get install python 3.8
      
        $ sudo add-apt-repository ppa:deadsnakes/ppa
$ sudo apt-get update
$ sudo apt-get install python3.8
      
        $ su
$ apt-get install sudo
$ vi /etc/sudoers

      
        $ sudo yum update
$ sudo yum install yum-utils
      
        $ sudo yum install https://centos7.iuscommunity.org/ius-release.rpm
      
        $ sudo yum install python38u
$ sudo yum install python38u-pip
      
        $ sudo dnf install python38
      
        $ packman -S python
      

Compiling Python From Source

        $ wget https://www.python.org/ftp/python/3.8.3/Python-3.8.3.tgz
      
        $ sudo apt-get update
$ sudo apt-get upgrade
      
        # For apt-based systems (like Debian, Ubuntu, and Mint)
$ sudo apt-get install -y make build-essential libssl-dev zlib1g-dev libbz2-dev libreadline-dev libsqlite3-dev wget curl llvm libncurses5-dev  libncursesw5-dev xz-utils tk-dev

# For yum-based systems (like CentOS)
$ sudo yum -y groupinstall development
$ sudo yum -y install zlib-devel
      
        $ tar xvf Python-3.8.3.tgz
$ cd Python-3.8.3
      
        $ ./configure --enable-optimizations --with-ensurepip=install
      
        $ make -j 8
      
        $ sudo make altinstall
      
        $ python3 -V
Python 3.8.3
      

macOS/Mac OS X - Installing Python

        $ brew install python3