Skip to content

Python und GUI

Verschoben Python3
1 1 201
  • Dank des netten Tipps meines Systemadministrator mal folgendes ausprobiert.

    Maschine

    Ubuntu20.04 in Virtual Box

    Software Installation

    python3 ist drauf. Also folgendes

    rank@frank-VirtualBox:~/python$ python3 -m pip install pysimplegui
    /usr/bin/python3: No module named pip
    

    Ok, ist einfach

    frank@frank-VirtualBox:~/python$ sudo apt install python3-pip
    

    Danach geht es

    frank@frank-VirtualBox:~/python$ python3 -m pip install pysimplegui
    Collecting pysimplegui
      Downloading PySimpleGUI-4.29.0-py3-none-any.whl (357 kB)
         |████████████████████████████████| 357 kB 2.0 MB/s 
    Installing collected packages: pysimplegui
    Successfully installed pysimplegui-4.29.0
    

    Beispiel hello_world.py

    # hello_world.py
    
    import PySimpleGUI as sg
    
    sg.Window(title="Hello World", layout=[[]], margins=(100, 50)).read()
    

    Bei der Ausführung kommt folgender Fehler

    frank@frank-VirtualBox:~/python$ python3 hello_world.py 
    Traceback (most recent call last):
      File "hello_world.py", line 3, in <module>
        import PySimpleGUI as sg
      File "/home/frank/.local/lib/python3.8/site-packages/PySimpleGUI/__init__.py", line 2, in <module>
        from .PySimpleGUI import *
      File "/home/frank/.local/lib/python3.8/site-packages/PySimpleGUI/PySimpleGUI.py", line 101, in <module>
        import tkinter as tk
    ModuleNotFoundError: No module named 'tkinter'
    

    Ok, fehlt noch was.

    frank@frank-VirtualBox:~/python$ sudo apt install python3-tk
    

    Danach funktioniert es.

    91b54d59-24ce-44d6-965c-749ae041c41c-grafik.png

  • Python3 - Pipenv für die virtuelle Entwicklungsumgebung

    Python3 python3 pipenv
    2
    1
    0 Stimmen
    2 Beiträge
    461 Aufrufe
    FrankMF
    Ich ko... immer, wenn ich mein VSCodium neu installieren muss. Das größte Problem dabei ist immer, das ich fast immer vergesse den Python Interpreter zu setzen. "CTRL+SHIFT+P" and choose the correct python interpreter. [image: 1656256156412-46f85075-4dbc-414c-94c2-abc5bb6009b6-grafik.png] Danach startet das Python Programm auch wieder aus der richtigen Entwicklungsumgebung
  • Python3 - PyQt6 installieren

    Python3 pyqt6 python3
    1
    0 Stimmen
    1 Beiträge
    438 Aufrufe
    Niemand hat geantwortet
  • Restic UI - QThread

    Restic UI restic-ui python3
    1
    0 Stimmen
    1 Beiträge
    159 Aufrufe
    Niemand hat geantwortet
  • Python3 - HTML Text ausgeben

    Python3 python3
    1
    0 Stimmen
    1 Beiträge
    178 Aufrufe
    Niemand hat geantwortet
  • Python3 - Umzug nach Fedora 34

    Python3 python3
    1
    0 Stimmen
    1 Beiträge
    209 Aufrufe
    Niemand hat geantwortet
  • Python3 - class BackupList

    Python3 python3
    2
    0 Stimmen
    2 Beiträge
    289 Aufrufe
    FrankMF
    Mir hat heute jemand auf Twitter zu meinem Problem geantwortet. https://twitter.com/OliverTheUnique/status/1381888728080211968 Das habe ich natürlich direkt, bei einer Tasse Kaffee, ausprobiert. Geht einwandfrei und ein Problem ist damit Vergangenheit. Bei meiner Konstruktion musste ich immer eine Länge für die Liste p vorgeben. p = list(range(10)) Das wird jetzt nicht mehr benötigt. Schön Jetzt muss ich mir das noch in Ruhe anschauen, nachlesen und verstehen. Danke für den netten Hinweis!
  • Python3 - QSettings

    Python3 python3
    1
    0 Stimmen
    1 Beiträge
    188 Aufrufe
    Niemand hat geantwortet
  • Wichtige Links

    Angeheftet Python3 python3
    1
    0 Stimmen
    1 Beiträge
    224 Aufrufe
    Niemand hat geantwortet