UBports Robot Logo UBports Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login

    How can i install pip on ubuntu touch

    Scheduled Pinned Locked Moved Support
    12 Posts 6 Posters 2.9k Views 2 Watching
    Loading More Posts
    • 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.
      • lduboeufL Offline
        lduboeuf @Python
        last edited by

        @Python
        I doubt you can install a full python environment on UT since it is not meant for that.
        https://ubports.com/en/blog/ubports-news-1/post/how-ubuntu-touch-works-3896
        Maybe via Libertine would work

        1 Reply Last reply Reply Quote 0
        • D Offline
          DPITTI @Python
          last edited by DPITTI

          This post is deleted!
          arubislanderA 1 Reply Last reply Reply Quote 0
          • arubislanderA Offline
            arubislander @DPITTI
            last edited by arubislander

            @DPITTI ,I have deleted your message, because, it contains harmful commands, that if executed could lead to an unbootable device.
            Also, your answer was in German, even though you have been repeatedly told in the past to communicate in English on the forums, or at the very least provide a translation with your answer. But the main reason was because of the harmful commands.
            Please do not suggest harmful commands to be executed that are known to potentially render the device unbootable. Consider this an official warning.

            @Python, Are you looking to install a python environment for development purposes? Or just for running scripts? How to best proceed may differ depending on what it is you want to do.

            🇦🇼 🇳🇱 🇺🇸 🇪🇸
            Happily running Ubuntu Touch
            JingPad (24.04-1.x daily)
            OnePlus Nord N10 5G (24.04-2.x daily)
            PinePhone OG (20.04)
            Meizu Pro 5 (16.04 DEV)
            Google Pixel 3a

            D R 2 Replies Last reply Reply Quote 0
            • D Offline
              DPITTI @arubislander
              last edited by DPITTI

              @arubislander Hello, that's all right. I think I know which command is meant by "autoremove". I should have added something else, namely the following, if a package is suggested to be deleted, write it out first and reinstall it. Personally, I have always done it this way. Of course this is a danger for others. But nevertheless, you are absolutely right in this situation. Because a lot depends on the port. The Xiaomi Redmi Note 9 MerlinX port was particularly bad. I learned a lot from Fuseteam there. In this sense, thanks for the feedback. Of course I don't want to destroy any devices! I don't think the device was that good ( MerlinX Port ).

              1 Reply Last reply Reply Quote 0
              • R Offline
                RJDan @arubislander
                last edited by

                @arubislander
                Can I follow this up. I would like to build the UT documentation on my UT device. This requires python3-pip and python3-virtualenv. when running the build.sh file from the repo, it fails with the following:

                Detected apt
                Reading package lists... Done
                Building dependency tree... Done
                Reading state information... Done
                W: Not using locking for read only lock file /var/lib/dpkg/lock-frontend
                W: Not using locking for read only lock file /var/lib/dpkg/lock
                E: Unable to locate package python3-pip
                E: Unable to locate package python3-virtualenv
                
                

                I guess it could not install. How can I manually install these?

                J 1 Reply Last reply Reply Quote 0
                • J Offline
                  johndoe @RJDan
                  last edited by

                  @RJDan said in How can i install pip on ubuntu touch:

                  Detected apt

                  You are not supposed to directly install things with apt on Ubuntu Touch. But programs that you would usually install in Ubuntu with apt (or other package managers like pip) can maybe be installed in a container under Ubuntu Touch. This is especially useful for non graphical programs.

                  One container solution to do this is Libertine: https://docs.ubports.com/en/latest/userguide/dailyuse/libertine.html

                  R 1 Reply Last reply Reply Quote 0
                  • KenedaK Keneda moved this topic from App Development
                  • R Offline
                    RJDan @johndoe
                    last edited by

                    @johndoe
                    So, if I want to edit the UT docs on my UT device, I should do it in a vm?

                    arubislanderA 1 Reply Last reply Reply Quote 0
                    • arubislanderA Offline
                      arubislander @RJDan
                      last edited by arubislander

                      @RJDan No, you can edit the docs in UT outside the container.
                      To be fair you only need the container to install pip3 and create a venv. Once you have some that, you can do the rest outside of the container. I would suggest you create the venv in one of the directories that are shared between the host and the container, like Documents or Downloads. Once created you can move it to wherever you wish.

                      🇦🇼 🇳🇱 🇺🇸 🇪🇸
                      Happily running Ubuntu Touch
                      JingPad (24.04-1.x daily)
                      OnePlus Nord N10 5G (24.04-2.x daily)
                      PinePhone OG (20.04)
                      Meizu Pro 5 (16.04 DEV)
                      Google Pixel 3a

                      R 2 Replies Last reply Reply Quote 1
                      • R Offline
                        RJDan @arubislander
                        last edited by

                        @arubislander
                        So I found a snap package with pip.
                        I am trying to figure out what to do about python3-virtualenv. When I use apt search to get some more info on this thing it recovers nothing. Is this not available on arm64?

                        1 Reply Last reply Reply Quote 0
                        • R Offline
                          RJDan @arubislander
                          last edited by

                          @arubislander
                          The snap package seems to have the venv package installed.
                          How can I safely make the snap package the default call to python3?

                          1 Reply Last reply Reply Quote 0
                          • First post
                            Last post