Cloudron makes it easy to run web apps like WordPress, Nextcloud, GitLab on your server. Find out more or install now.


Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Bookmarks
  • Search
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo

Cloudron Forum

Apps | Demo | Docs | Install
  1. Cloudron Forum
  2. Support
  3. Removing Python 2.7

Removing Python 2.7

Scheduled Pinned Locked Moved Solved Support
awspython
6 Posts 3 Posters 322 Views 3 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.
  • S Offline
    S Offline
    sparkwise
    wrote on last edited by joseph
    #1

    We run Cloudron on an AWS EC2 instance (Ubuntu 22.04LTS), and Amazon Inspector is flagging security issues with Python 2.7 on this box that are now only being fixed in Ubuntu's "Extended Security Maintenance" (esm3). As best I can tell, we're not actually using Python 2.7 for installed apps, so I'm wondering about uninstalling Python 2.7 entirely from our Cloudron. What would you recommend?

    BrutalBirdieB 1 Reply Last reply
    1
    • S sparkwise

      We run Cloudron on an AWS EC2 instance (Ubuntu 22.04LTS), and Amazon Inspector is flagging security issues with Python 2.7 on this box that are now only being fixed in Ubuntu's "Extended Security Maintenance" (esm3). As best I can tell, we're not actually using Python 2.7 for installed apps, so I'm wondering about uninstalling Python 2.7 entirely from our Cloudron. What would you recommend?

      BrutalBirdieB Offline
      BrutalBirdieB Offline
      BrutalBirdie
      Partner
      wrote on last edited by
      #2

      @sparkwise said in Removing Python 2.7:

      What would you recommend?

      🤷 Cloudron does automatic security updates.
      Why your AWS is complaining is a different topic.
      Do you mean this?

      from => Reddit - Amazon Inspector showing package vulnerabilities on an EC2 instance that aren't installed?

      What I would recommend?
      Well, if you want to test it, shutdown, snapshot, uninstall python and see what happens and report back here for everyone to learn from your findings.

      Like my work? Consider donating a drink. Cheers!

      1 Reply Last reply
      1
      • S Offline
        S Offline
        sparkwise
        wrote on last edited by
        #3

        Thanks for the pointer! I doesn't look like Inspector is reporting spurious findings, though: Python 2.7 appears to be fully installed and active on the system, and is not just remnant configuration files picked up by SSM.

        I don't see any indication that Python 2.7 is used by any Cloudron containers, so I think that removing the python2.7 and python2.7-minimal packages is the best path forward. My hesitation is the presence of the python-is-python2 package:

        $ sudo apt-get --simulate remove python2.7 python2.7-minimal
        The following packages will be REMOVED:
          python-is-python2 python2 python2-minimal python2.7 python2.7-minimal
        
        $ dpkg -l | grep python-is-python2
        ii  python-is-python2                      2.7.17-4                                all          symlinks /usr/bin/python to the DEPRECATED python2
        

        Wondering if that changes the recommended path forward.

        1 Reply Last reply
        0
        • BrutalBirdieB Offline
          BrutalBirdieB Offline
          BrutalBirdie
          Partner
          wrote on last edited by
          #4

          Oh! Python 2.7! My mind just ignored the 2 and just made it a 3.
          No Python 2.7 is not used by anything Cloudron related.

          Here is the Python installed list from a fresh setup Ubuntu 24 with Cloudron on my system:

          libpython3-stdlib/noble-updates,now 3.12.3-0ubuntu2 amd64 [installed,automatic]
          libpython3.12-minimal/noble-updates,noble-security,now 3.12.3-1ubuntu0.5 amd64 [installed,automatic]
          libpython3.12-stdlib/noble-updates,noble-security,now 3.12.3-1ubuntu0.5 amd64 [installed,automatic]
          libpython3.12t64/noble-updates,noble-security,now 3.12.3-1ubuntu0.5 amd64 [installed]
          python-apt-common/noble-updates,now 2.7.7ubuntu4 all [installed,automatic]
          python-babel-localedata/noble,now 2.10.3-3build1 all [installed,automatic]
          python3-apport/noble-updates,now 2.28.1-0ubuntu3.3 all [installed,automatic]
          python3-apt/noble-updates,now 2.7.7ubuntu4 amd64 [installed]
          python3-attr/noble,now 23.2.0-2 all [installed,automatic]
          python3-automat/noble,now 22.10.0-2 all [installed,automatic]
          python3-babel/noble,now 2.10.3-3build1 all [installed,automatic]
          python3-bcrypt/noble,now 3.2.2-1build1 amd64 [installed,automatic]
          python3-blinker/noble,now 1.7.0-1 all [installed,automatic]
          python3-boto3/noble,now 1.34.46+dfsg-1ubuntu1 all [installed,automatic]
          python3-botocore/noble,now 1.34.46+repack-1ubuntu1 all [installed,automatic]
          python3-certifi/noble,now 2023.11.17-1 all [installed,automatic]
          python3-cffi-backend/noble,now 1.16.0-2build1 amd64 [installed,automatic]
          python3-chardet/noble,now 5.2.0+dfsg-1 all [installed,automatic]
          python3-click/noble,now 8.1.6-2 all [installed,automatic]
          python3-colorama/noble,now 0.4.6-4 all [installed,automatic]
          python3-commandnotfound/noble,now 23.04.0 all [installed,automatic]
          python3-configobj/noble,now 5.0.8-3 all [installed,automatic]
          python3-constantly/noble,now 23.10.4-1 all [installed,automatic]
          python3-cryptography/noble-updates,noble-security,now 41.0.7-4ubuntu0.1 amd64 [installed,automatic]
          python3-dateutil/noble,now 2.8.2-3ubuntu1 all [installed,automatic]
          python3-dbus/noble,now 1.3.2-5build3 amd64 [installed,automatic]
          python3-debconf/noble,now 1.5.86ubuntu1 all [installed,automatic]
          python3-debian/noble,now 0.1.49ubuntu2 all [installed,automatic]
          python3-distro-info/noble,now 1.7build1 all [installed,automatic]
          python3-distro/noble,now 1.9.0-1 all [installed,automatic]
          python3-distupgrade/noble-updates,now 1:24.04.26 all [installed,automatic]
          python3-gdbm/noble,now 3.12.3-0ubuntu1 amd64 [installed,automatic]
          python3-gi/noble,now 3.48.2-1 amd64 [installed,automatic]
          python3-hamcrest/noble,now 2.1.0-1 all [installed,automatic]
          python3-httplib2/noble,now 0.20.4-3 all [installed,automatic]
          python3-hyperlink/noble,now 21.0.0-5 all [installed,automatic]
          python3-idna/noble-updates,noble-security,now 3.6-2ubuntu0.1 all [installed,automatic]
          python3-incremental/noble,now 22.10.0-1 all [installed,automatic]
          python3-jinja2/noble-updates,noble-security,now 3.1.2-1ubuntu1.2 all [installed,automatic]
          python3-jmespath/noble,now 1.0.1-1 all [installed,automatic]
          python3-json-pointer/noble,now 2.0-0ubuntu1 all [installed,automatic]
          python3-jsonpatch/noble,now 1.32-3 all [installed,automatic]
          python3-jsonschema/noble,now 4.10.3-2ubuntu1 all [installed,automatic]
          python3-jwt/noble,now 2.7.0-1 all [installed,automatic]
          python3-launchpadlib/noble,now 1.11.0-6 all [installed,automatic]
          python3-lazr.restfulclient/noble,now 0.14.6-1 all [installed,automatic]
          python3-lazr.uri/noble,now 1.0.6-3 all [installed,automatic]
          python3-magic/noble,now 2:0.4.27-3 all [installed]
          python3-markdown-it/noble,now 3.0.0-2 all [installed,automatic]
          python3-markupsafe/noble,now 2.1.5-1build2 amd64 [installed,automatic]
          python3-mdurl/noble,now 0.1.2-1 all [installed,automatic]
          python3-minimal/noble-updates,now 3.12.3-0ubuntu2 amd64 [installed,automatic]
          python3-netifaces/noble,now 0.11.0-2build3 amd64 [installed,automatic]
          python3-netplan/noble-updates,now 1.1.1-1~ubuntu24.04.1 amd64 [installed,automatic]
          python3-newt/noble,now 0.52.24-2ubuntu2 amd64 [installed,automatic]
          python3-oauthlib/noble,now 3.2.2-1 all [installed,automatic]
          python3-openssl/noble,now 23.2.0-1 all [installed,automatic]
          python3-packaging/noble,now 24.0-1 all [installed,automatic]
          python3-pexpect/noble,now 4.9-2 all [installed,automatic]
          python3-pkg-resources/noble-updates,noble-security,now 68.1.2-2ubuntu1.1 all [installed,automatic]
          python3-problem-report/noble-updates,now 2.28.1-0ubuntu3.3 all [installed,automatic]
          python3-ptyprocess/noble,now 0.7.0-5 all [installed,automatic]
          python3-pyasn1-modules/noble,now 0.2.8-1 all [installed,automatic]
          python3-pyasn1/noble,now 0.4.8-4 all [installed,automatic]
          python3-pyasyncore/noble,now 1.0.2-2 all [installed,automatic]
          python3-pygments/noble,now 2.17.2+dfsg-1 all [installed,automatic]
          python3-pyinotify/noble,now 0.9.6-2ubuntu1 all [installed,automatic]
          python3-pyparsing/noble,now 3.1.1-1 all [installed,automatic]
          python3-pyrsistent/noble,now 0.20.0-1build2 amd64 [installed,automatic]
          python3-requests/noble,now 2.31.0+dfsg-1ubuntu1 all [installed,automatic]
          python3-rich/noble,now 13.7.1-1 all [installed,automatic]
          python3-s3transfer/noble,now 0.10.1-1ubuntu2 all [installed,automatic]
          python3-serial/noble,now 3.5-2 all [installed,automatic]
          python3-service-identity/noble,now 24.1.0-1 all [installed,automatic]
          python3-setuptools/noble-updates,noble-security,now 68.1.2-2ubuntu1.1 all [installed,automatic]
          python3-six/noble,now 1.16.0-4 all [installed,automatic]
          python3-software-properties/noble-updates,now 0.99.49.1 all [installed,automatic]
          python3-systemd/noble,now 235-1build4 amd64 [installed,automatic]
          python3-twisted/noble-updates,noble-security,now 24.3.0-1ubuntu0.1 all [installed,automatic]
          python3-tz/noble,now 2024.1-2 all [installed,automatic]
          python3-update-manager/noble-updates,now 1:24.04.9 all [installed,automatic]
          python3-urllib3/noble-updates,noble-security,now 2.0.7-1ubuntu0.1 all [installed,automatic]
          python3-wadllib/noble,now 1.3.6-5 all [installed,automatic]
          python3-xkit/noble,now 0.5.0ubuntu6 all [installed,automatic]
          python3-yaml/noble,now 6.0.1-2build2 amd64 [installed,automatic]
          python3-zope.interface/noble,now 6.1-1build1 amd64 [installed,automatic]
          python3.12-minimal/noble-updates,noble-security,now 3.12.3-1ubuntu0.5 amd64 [installed,automatic]
          python3.12/noble-updates,noble-security,now 3.12.3-1ubuntu0.5 amd64 [installed]
          python3/noble-updates,now 3.12.3-0ubuntu2 amd64 [installed]
          

          Like my work? Consider donating a drink. Cheers!

          1 Reply Last reply
          0
          • nebulonN Offline
            nebulonN Offline
            nebulon
            Staff
            wrote on last edited by
            #5

            This is strange where python2 would be coming from. The python versions Cloudron installs (depending on the ubuntu versions) are listed at https://git.cloudron.io/platform/box/-/blob/master/scripts/init-ubuntu.sh?ref_type=heads#L73

            1 Reply Last reply
            0
            • J joseph marked this topic as a question on
            • S Offline
              S Offline
              sparkwise
              wrote on last edited by
              #6

              Removing 2.7 seems to have been seamless. Thank you!

              1 Reply Last reply
              1
              • J joseph has marked this topic as solved on
              Reply
              • Reply as topic
              Log in to reply
              • Oldest to Newest
              • Newest to Oldest
              • Most Votes


              • Login

              • Don't have an account? Register

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • Bookmarks
              • Search