python3 - problem installationen / pip

  • Hi,

    ich bekomme folgende Fehlermeldung beim Versuch mit pip install . eine Software (python3 github projekt) zu installieren:

    nun wollte ich python3 und pip / pip3 entfernen um eventuell sauber python3 und pip nochmal installieren zu können:

    ich denk ich hab da einiges zu viel drauf:

    wie kann ich da sauber aufräumen, um der ersten Meldung gerecht zu werden:

    Code
    requires a different Python: 3.9.9 not in '<4,>=3.10'

    danke

  • Wer kan mir das erklären warum python3 auf 3.9.9 zeigt und nicht auf 3.10 ?

  • Wer kan mir das erklären warum python3 auf 3.9.9 zeigt und nicht auf 3.10 ?

    Wie sind die Ausgaben von:

    Code
    apt policy python3
    uname -a

    ?

  • Wie sind die Ausgaben von:

    Code
    apt policy python3
    uname -a

    ?

    root@raspberrypi:/usr/bin# apt policy python3

    python3:

    Installed: (none)

    Candidate: 3.5.3-1

    Version table:

    3.5.3-1 500

    500 http://raspbian.raspberrypi.org/raspbian stretch/main armhf Packages

    100 /var/lib/dpkg/status

    root@raspberrypi:/usr/bin# uname -a

    Linux raspberrypi 4.19.66-v7+ #1253 SMP Thu Aug 15 11:49:46 BST 2019 armv7l GNU/Linux

    root@raspberrypi:/usr/bin#

  • Wäre es evtl. möglich, dass Du das aktuelle bullseye installierst und pip in einer "virtual environment" benutzt?

  • ich hab da ein git project, das ich installieren möchte am RPI 4:

    Funktioniert dieses "git project" _nur_ mit stretch, auf dem PI4?

  • klaus1 Python 3.10 auf Stretch wird wohl nicht funktionieren.

    Python 3.10 benötigt anscheinend openssl >= 1.1.1 Stretch hat aber nur 1.1.0

    https://github.com/pyenv/pyenv/issues/1943

    //EDIT

    Selbst bei bullseye64bit ist die verfügbare Version in den offiziellen Repos 3.9.2-3

    Code
    ~ $ apt policy python3
    python3:
      Installed: 3.9.2-3
      Candidate: 3.9.2-3
      Version table:
     *** 3.9.2-3 500
            500 http://deb.debian.org/debian bullseye/main arm64 Packages
            100 /var/lib/dpkg/status
  • Das Problem ist, dass Python 3.10 offensichtlich eine Anforderung ist und du eine Distribution einsetzt, die ein paar Versionen hinterherhängt. Das Problem ist aber auch, dass selbst die neuste Debian-Version kein Python 3.10 mit anbietet, d.h. man muss sich Python selber kompilieren oder die Docker-Alternative nutzen. Wenn man selbst kompiliert, muss man dafür sorgen, dass man kein Durcheinander hat.

    Ich bin kein Fan von Docker, aber probier doch mal das Docker-Image.

  • hab ja bereits python 3.10 installieren können.

    Nein, hast du nicht

  • .... nur den alias schaff ich nicht umzulegen.

    Wie sind die Ausgaben von:

    Code
    echo $PATH
    which -a python3; echo $?

    ?

  • Ich hoffe, dass du Python 3.10 nicht neben dem Paket der Distribution installiert hast. Das ist das Durcheinander, was ich meinte.

    Wenn sich Python irgendwo im Pfad befindet, z.B. /user/bin/python3.10, so kannst du den Interpreter direkt adressieren und ein venv erstellen:

    Code
    /usr/bin/python3.10 -m venv watts_env
    source watts_env/bin/activate
    pip install git+https://github.com/joscha82/wattpilot.git

    Später kannst du das venv mit source watts_env/bin/activate aktivieren.

    Danach solltest du wattpilotshell nutzen können, sofern Python 3.10 sich an dem vermuteten Ort befindet.

    Ich habe mein venv z.B. für den Test hier installiert: /home/andre/git/wattpilot/env/

    Der Header der Datei /home/andre/git/wattpilot/env/bin/wattpilotshell sieht so aus:

    Code
    #!/home/andre/git/wattpilot/env/bin/python3

    D.h. im Umkehrschluss kann man das Script auch direkt ausführen und dann wird der richtige venv verwendet.

    Du musst natürlich auch die ganzen Umgebungsvariablen setzen, sonst startet das Programm nicht.

    WATTPILOT_HOST usw...

  • root@raspberrypi:~# which -a python3; echo $?

    /usr/bin/python3

    0

    Wie sind die Ausgaben von:

    Code
    ls -la /usr/local/bin/python3.10
    ls -la /usr/bin/python3

    ?

  • Wie sind die Ausgaben von:

    Code
    ls -la /usr/local/bin/python3.10
    ls -la /usr/bin/python3

    ?

    root@raspberrypi:~# ls -la /usr/local/bin/python3.10

    -rwxr-xr-x 1 root staff 14553544 Feb 20 18:58 /usr/local/bin/python3.10

    root@raspberrypi:~# ls -la /usr/bin/python3

    lrwxrwxrwx 1 root root 25 Feb 21 08:58 /usr/bin/python3 -> /usr/local/bin/python3.10

    root@raspberrypi:~#

  • root@raspberrypi:~# ls -la /usr/bin/python3

    lrwxrwxrwx 1 root root 25 Feb 21 08:58 /usr/bin/python3 -> /usr/local/bin/python3.10

    Wegen:

    Code
    # python3 -V
    Python 3.9.9

    , wie sind die Ausgaben von:

    Code
    file /usr/bin/python3
    find / -iname 'python3'

    ?

  • Wegen:

    Code
    # python3 -V
    Python 3.9.9

    , wie sind die Ausgaben von:

    Code
    file /usr/bin/python3
    find / -iname 'python3'

    ?

    root@raspberrypi:~# file /usr/bin/python3

    /usr/bin/python3: symbolic link to /usr/local/bin/python3.10

    root@raspberrypi:~# find / -iname 'python3'

    find: ‘/proc/539/task/26079’: No such file or directory

    /usr/bin/python3

    /usr/lib/python3

    /usr/share/bash-completion/completions/python3

    /etc/python3

    find: ‘/run/user/112/gvfs’: Permission denied

    /root/scripts/python3

    /root/watts_env/bin/python3

    root@raspberrypi:~#

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!