Facebook Twitter Instagram
    TecAdmin
    • Home
    • FeedBack
    • Submit Article
    • About Us
    Facebook Twitter Instagram
    TecAdmin
    You are at:Home»Linux Tutorials»How to Install Python 3.5 on Ubuntu, Debian & Linuxmint

    How to Install Python 3.5 on Ubuntu, Debian & Linuxmint

    By RahulMay 23, 20202 Mins Read

    This article will help you to install Python 3.5.9 on Ubuntu, Debian, and Linuxmint operating system. To know more about this version visit Python official website.

    Advertisement

    Step 1 – Prerequisites

    You must have fulfilled all the prerequisites for installing Python on Ubuntu, Debian and Linuxmint. Use the following command to install all the prerequisites. After that go for the Python installation on Ubuntu.

    sudo apt-get install build-essential checkinstall
    sudo apt-get install libreadline-gplv2-dev libncursesw5-dev libssl-dev libsqlite3-dev tk-dev libgdbm-dev libc6-dev libbz2-dev
    

    Step 2 – Download Python 3.5

    Download Python source code archive from its official download website. You can also download Python 3.5 version using the following commands.

    cd /usr/src
    wget https://www.python.org/ftp/python/3.5.9/Python-3.5.9.tgz
    

    Now extract the downloaded archive on your system.

    sudo tar xzf Python-3.5.9.tgz
    

    Step 3 – Install Python on Linux

    Use below set of commands to compile Python source code on your system using altinstall. This will install Python on an Ubuntu and LinuxMint system.

    cd Python-3.5.9
    sudo ./configure --enable-optimizations
    sudo make altinstall
    

    make altinstall is used to prevent replacing the default python binary file /usr/bin/python.

    Step 4 – Check the Python Version

    You have successfully installed Python on Linux. Check the Python version installed using the command:

    python3.5 -V
    
    Python 3.5.9
    

    Python Python3 Python3.5
    Share. Facebook Twitter Pinterest LinkedIn Tumblr Email WhatsApp

    Related Posts

    What are the Python Static Variables

    Modulus Operator (%) in Bash

    Using Modulus Operator (%) in Bash

    Calculate Remainder in Bash

    How to Calculate Remainder (%) of a Division in Bash

    View 21 Comments

    21 Comments

    1. sverx on May 4, 2021 5:16 pm

      Thanks! I needed Python3.5 on my Linux Mint 20.1 but it just comes with 3.8 and 3.9
      Since I also needed the libpython3.5m.so.1.0 file, I had to
      sudo ./configure –enable-shared –enable-optimizations

      Reply
    2. Sanjay on November 28, 2020 10:56 am

      How to install virtual environment for newly installed python3.5. My goal is to install TensorFlow using Python3.5 not with the default Python3.8
      Do i have to specify Python3.5 instead of Python3? Because in Ubuntu 20.04 Python3 indicate to default Python3.8.

      sudo apt install -y python3.5-venv
      python3.5 -m venv my_env

      Please correct me if i am wrong.

      Reply
    3. Thomas on November 6, 2020 9:26 am

      Thank you so much!
      Really useful guidance.

      Reply
    4. Libby on October 20, 2020 11:21 pm

      Thanks so much this was easy to follow and i found to work successfully for me!

      Reply
    5. Sanjay on September 13, 2020 6:35 am

      After successful installation, it does not show in
      update-alternatives –list python

      Reply
      • Rahul on September 14, 2020 3:15 am

        Do not change default Python version of system. It may break multiple commands.

        Reply
    6. Sanjay on September 13, 2020 6:34 am

      How do we uninstall?

      Reply
    7. Saran on June 2, 2020 9:07 pm

      Fixed lot of bugs….! Thank you

      Reply
    8. Yair on April 27, 2020 3:51 am

      thanks bro you help me

      Reply
    9. Name on July 31, 2019 4:43 pm

      This article is shit.

      Reply
    10. say10 on May 5, 2019 12:00 am

      thanks a lot, great tutorial

      Reply
    11. Miracles Happen on April 26, 2019 1:17 am

      Excellent! I just followed your clear instructions and now it’s installed. Thank you!

      Reply
    12. Tom on February 22, 2019 9:44 pm

      Super helpful, wasn’t sure how to make this work from the python site, thx!!!

      Reply
    13. Katya on December 19, 2018 6:18 pm

      Thank you! It worked!

      Reply
    14. Magda on July 26, 2018 7:53 am

      Finally succeeded to install Python3.5. Thanks for the article!

      Reply
    15. Kryone on May 30, 2018 8:18 am

      but how do u run it? i cant open it. it just opens the archive mounter. there’s no application thing or anything like that.

      Reply
    16. Kryone on May 30, 2018 8:15 am

      but how do u run it? i cant open it. it just opens the archive mounter

      Reply
    17. ahmad on February 10, 2018 12:00 pm

      very helpful Thanks
      Respect from Lhr,Pak

      Reply
    18. Khurrum on March 26, 2017 5:04 am

      Thank you so much for the useful guidance.

      Reply
      • Shubhanshu on July 8, 2017 10:26 pm

        sudo apt-get install software-properties-common python-software-properties
        sudo add-apt-repository ppa:fkrull/deadsnakes
        sudo apt-get update
        sudo apt-get install python3.5

        This is better.

        Reply
        • bux on March 26, 2018 9:34 am

          Not work on last ubuntu: fkrull/deadsnakes don’t support las distribs

          Reply

    Leave A Reply Cancel Reply

    Advertisement
    Recent Posts
    • Configure Postfix to Use Gmail SMTP on Ubuntu & Debian
    • PHP Arrays: A Beginner’s Guide
    • Deploying Flask Application on Ubuntu (Apache+WSGI)
    • OpenSSL: Working with SSL Certificates, Private Keys and CSRs
    • How to Create and Read List in Python
    Facebook Twitter Instagram Pinterest
    © 2023 Tecadmin.net. All Rights Reserved | Terms  | Privacy Policy

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