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
    10 Posts 6 Posters 2.0k 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.
      • P Offline
        Python
        last edited by

        I want to use python-pip on ubuntu touch but i cant install:
        hablet@ubuntu-phablet:~$ sudo apt install python3-pip
        [sudo] password for phablet:
        Sorry, try again.
        [sudo] password for phablet:
        Paketlisten werden gelesen... Fertig
        Abhängigkeitsbaum wird aufgebaut.
        Statusinformationen werden eingelesen.... Fertig
        Probieren Sie »apt --fix-broken install«, um dies zu korrigieren.
        Die folgenden Pakete haben unerfüllte Abhängigkeiten:
        g++ : Hängt ab von: g++-9 (>= 9.3.0-3~) soll aber nicht installiert werden
        libpython3-dev : Hängt ab von: libpython3.8-dev (>= 3.8.2-1~) soll aber nicht installiert werden
        python3-pip : Hängt ab von: python3-setuptools soll aber nicht installiert werden
        python3.8-dev : Hängt ab von: libpython3.8-dev (= 3.8.10-0ubuntu1~20.04.8) soll aber nicht installiert werden
        E: Unerfüllte Abhängigkeiten. Versuchen Sie »apt --fix-broken install« ohne Angabe eines Pakets (oder geben Sie eine Lösung an).

        How can i fix it or install it?
        Thanks for help

        P lduboeufL 2 Replies Last reply Reply Quote 0
        • P Offline
          Python @Python
          last edited by

          Sorry it is in german

          D 1 Reply Last reply Reply Quote 0
          • 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
                Google Pixel 3a (24.04 preview)
                JingPad (24.04 preview)
                PinePhone OG (20.04)
                Meizu Pro 5 (16.04 DEV)

                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

                          @RJDan No, you can edit the docs in UTout side 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 whish.

                          🇦🇼 🇳🇱 🇺🇸 🇪🇸
                          Happily running Ubuntu Touch
                          Google Pixel 3a (24.04 preview)
                          JingPad (24.04 preview)
                          PinePhone OG (20.04)
                          Meizu Pro 5 (16.04 DEV)

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