Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. General talk
  3. The Lounge
  4. Install Python on Ubuntu
Forum Updated to NodeBB v4.3 + New Features

Install Python on Ubuntu

Scheduled Pinned Locked Moved Unsolved The Lounge
10 Posts 8 Posters 1.3k Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • G Offline
    G Offline
    Gulshan Negi
    Banned
    wrote on 15 Aug 2021, 06:35 last edited by
    #1

    I am trying to install Python 3.9 on my Ubuntu OS, I try to install Python in the following manner
    sudo apt-get install python3.9
    after seems installed I tried checking the version:
    python -V
    However, this input returns:
    -bash: python: command not found
    It seems like Python versions don't fully install.
    Can anyone help me for installation Python on Ubuntu?

    J 1 Reply Last reply 15 Aug 2021, 07:11
    0
    • G Gulshan Negi
      15 Aug 2021, 06:35

      I am trying to install Python 3.9 on my Ubuntu OS, I try to install Python in the following manner
      sudo apt-get install python3.9
      after seems installed I tried checking the version:
      python -V
      However, this input returns:
      -bash: python: command not found
      It seems like Python versions don't fully install.
      Can anyone help me for installation Python on Ubuntu?

      J Online
      J Online
      JonB
      wrote on 15 Aug 2021, 07:11 last edited by
      #2

      @Gulshan-Negi
      It certainly used to be the case that under Ubuntu/Linux generally python attempts to run Python 2.x. To run Python 3.x you are/were supposed to type python3?

      1 Reply Last reply
      1
      • G Offline
        G Offline
        Gulshan Negi
        Banned
        wrote on 27 Aug 2021, 06:13 last edited by
        #3
        This post is deleted!
        J 1 Reply Last reply 27 Aug 2021, 06:38
        0
        • G Gulshan Negi
          27 Aug 2021, 06:13

          This post is deleted!

          J Online
          J Online
          JonB
          wrote on 27 Aug 2021, 06:38 last edited by
          #4

          @Gulshan-Negi
          I don't really know why you needed to do anything. Ubuntu 20.04+ comes with Python 3 already installed....

          1 Reply Last reply
          0
          • S Offline
            S Offline
            SGaist
            Lifetime Qt Champion
            wrote on 27 Aug 2021, 18:49 last edited by
            #5

            Currently python is by default python2. To ensure you are getting the Python 3 interpreter call python3.

            As for having different versions of python on your system, I would recommend using either virtualenv or conda to manage them rather than system installation. This will allow you to work in isolated environments tailored to the needs of your projects.

            Interested in AI ? www.idiap.ch
            Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

            1 Reply Last reply
            0
            • W Offline
              W Offline
              Westley Martin
              Banned
              wrote on 22 Nov 2021, 18:05 last edited by
              #6

              To run Python 3.x you are/were supposed to type python3

              1 Reply Last reply
              0
              • K Offline
                K Offline
                Kent-Dorfman
                wrote on 23 Nov 2021, 21:47 last edited by
                #7

                alternatives is a front end for simply replacing the /usr/bin symlinks. You can make /usr/bin/python point to whatever version you have installed. I'm in upgrade to python3 hell at the moment because I installed debian 11 on my newest workstation and I need to make it backward compatible with bunches of NFS shared python2 programs I run interchangably on other machines. of course many of those apps use python2 specific modules that aren't available in debian11.

                1 Reply Last reply
                0
                • W Offline
                  W Offline
                  woky
                  Banned
                  wrote on 30 Jun 2022, 12:18 last edited by woky
                  #8
                  This post is deleted!
                  1 Reply Last reply
                  0
                  • C Offline
                    C Offline
                    claudiajohnston
                    Banned
                    wrote on 5 Jul 2022, 00:58 last edited by
                    #9
                    This post is deleted!
                    J 1 Reply Last reply 5 Jul 2022, 05:24
                    0
                    • C claudiajohnston
                      5 Jul 2022, 00:58

                      This post is deleted!

                      J Offline
                      J Offline
                      jsulm
                      Lifetime Qt Champion
                      wrote on 5 Jul 2022, 05:24 last edited by
                      #10
                      This post is deleted!
                      1 Reply Last reply
                      0

                      • Login

                      • Login or register to search.
                      • First post
                        Last post
                      0
                      • Categories
                      • Recent
                      • Tags
                      • Popular
                      • Users
                      • Groups
                      • Search
                      • Get Qt Extensions
                      • Unsolved