Close Menu

    Subscribe to Updates

    Get the latest creative news from FooBar about art, design and business.

    What's Hot

    Mikrotik SSTP VPN, Installing, Scripts, Advantages, and Disadvantages

    October 6, 2024

    How to Install Python3 on Centos 7

    December 26, 2021

    Is your VPN safe ? – Part1

    April 15, 2021
    Facebook X (Twitter) Instagram
    • Technology
    • Gaming
    Facebook X (Twitter) Instagram Pinterest Vimeo
    Unix ZoneUnix Zone
    • Home
    • Categories
      • Featured
      • Inspiration
      • Article
    • Business
    Subscribe
    Unix ZoneUnix Zone
    Home»Article»How to Install Python3 on Centos 7
    Article

    How to Install Python3 on Centos 7

    adminBy adminDecember 26, 2021Updated:December 26, 2021No Comments2 Mins Read
    Share Facebook Twitter Pinterest LinkedIn Tumblr Reddit Telegram Email
    Share
    Facebook Twitter LinkedIn Pinterest Email

    Happy Holiday and greeting from Unixzone…

    In this lesson, we want to learn how to install python3 on centos 7. By default, in the new release of centos, python 3.6.X is available to install from the default repository. However, there is no chance to install from the default repository for the upper version.

    First we will cover install python from default repository :

    1 – Update your OS to the latest version of centos 7.

    yum update -y

    2 – Install development tools and some prerequisite packages.

    yum groupinstall -y "Development Tools" && yum install gcc openssl-devel bzip2-devel libffi-devel -y

    3 – Install python3 from repository.

    yum install python3 -y

    4 – Confirm python is installed or not.

    [root@website ~]# python3.6 -V
    Python 3.6.8

    The second method is to install from the source, which is very useful in many environments, especially when you do not have root access and are a normal user and want to have a python for running your project.

    1 – Download the desired version of python3 based on your requirements. In this case, the tutorial supports the latest version of 3.6.X.

    wget -c https://www.python.org/ftp/python/3.6.14/Python-3.6.14.tar.xz

    2 – Install development tools and some prerequisite packages.

    yum groupinstall -y "Development Tools" && yum install gcc openssl-devel bzip2-devel libffi-devel -y

    3 – extract th file.

    tar -xf Python-3.6.14.tar.xz

    4 – enter to the directory.

    cd Python-3.6.14

    5 – edit setup file for enabling SSL.

    This step is crucial because SSL must be enabled on python in most cases.

    if you are compiling python 3.6.X below file must be edited :

    vi Modules/Setup.dist

    on new version such as 3.7 or 3.8, name of file is changed to below one :

    vi Modules/Setup

    find SSL lines and uncommnet below lines:

    _ssl _ssl.c \
     -DUSE_SSL -I$(SSL)/include -I$(SSL)/include/openssl \
     -L$(SSL)/lib -lssl -lcrypto

    there must not be any # at the first of the above lines. Save and exit it.

    6 – configure the python on the desired path.

    ./configure --prefix=/data/Python3.6.14

    7 – make it.

    make

    8 – finally, make then install on the desired path.

    make install

    9 – check installed python with below command.

    /data/Python3.6.14/bin/python3.6 -V

    I hope, enjoy this article. Put your comments for me in order to improve the quality of posts.

    centos centos7 install linux python python3 redhat
    Share. Facebook Twitter Pinterest LinkedIn Tumblr Email
    Previous ArticleIs your VPN safe ? – Part1
    Next Article Mikrotik SSTP VPN, Installing, Scripts, Advantages, and Disadvantages
    admin
    • Website

    Related Posts

    Article

    Mikrotik SSTP VPN, Installing, Scripts, Advantages, and Disadvantages

    October 6, 2024
    Article

    Mikrotik SSTP VPN, Installing, Scripts, Advantages, and Disadvantages

    September 20, 2020
    Add A Comment
    Leave A Reply Cancel Reply

    Subscription Box

    Subscribe to our mailing list and get interesting stuff and updates to your email inbox.

    Thank you for subscribing.

    Something went wrong.

    Demo
    Top Posts

    Mikrotik SSTP VPN, Installing, Scripts, Advantages, and Disadvantages

    October 6, 2024208 Views

    Mikrotik SSTP VPN, Installing, Scripts, Advantages, and Disadvantages

    September 20, 2020204 Views

    How to Install Python3 on Centos 7

    December 26, 202113 Views
    Stay In Touch
    • Facebook
    • YouTube
    • TikTok
    • WhatsApp
    • Twitter
    • Instagram
    Latest Reviews

    Subscribe to Updates

    Get the latest tech news from FooBar about tech, design and biz.

    Demo
    Most Popular

    Mikrotik SSTP VPN, Installing, Scripts, Advantages, and Disadvantages

    October 6, 2024208 Views

    Mikrotik SSTP VPN, Installing, Scripts, Advantages, and Disadvantages

    September 20, 2020204 Views

    How to Install Python3 on Centos 7

    December 26, 202113 Views
    Our Picks

    Mikrotik SSTP VPN, Installing, Scripts, Advantages, and Disadvantages

    October 6, 2024

    How to Install Python3 on Centos 7

    December 26, 2021

    Is your VPN safe ? – Part1

    April 15, 2021

    Subscribe to Updates

    Get the latest creative news from FooBar about art, design and business.

    Facebook X (Twitter) Instagram YouTube LinkedIn WhatsApp Telegram
    • Home
    • Technology
    • Gaming
    • Phones
    • Buy Now
    © 2025 All Right Reserved By Gulf Digital Portal ThemeSphere.

    Type above and press Enter to search. Press Esc to cancel.