Bonjour,
J’essaie d’executer un fichier .py avec le code ci-dessous depuis un terminal
import PySimpleGUI as sg
sg.theme('DarkTeal9')
layout = [
[sg.Text('Formulaire Rex')],
[sg.Text('Station',size = (15,1)),sg.InputText(key='Station')],
[sg.Submit(), sg.Exit()]
]
je fait appel au module "PySimpleGUI dans mon code, j’ai bien téléchargé le module depuis le terminal, avec Pip Install, et il est bien installé
hmoukala@FR00L-TC032-01 /cygdrive/d/Gui_Python
$ pip list
Package Version
----------- -------
pip 22.2.1
PySimpleGUI 4.60.4
setuptools 63.2.0
[notice] A new release of pip available: 22.2.1 -> 23.0.1
[notice] To update, run: C:\Users\hmoukala\AppData\Local\Programs\Python\Python3
10\python.exe -m pip install --upgrade pip
Et j’ai rajouté le chemin d’accès dans le PATH des variables d’environment
hmoukala@FR00L-TC032-01 /cygdrive/d/Gui_Python
$ pip show PySimpleGUI
Name: PySimpleGUI
Version: 4.60.4
Summary: Python GUIs for Humans. Launched in 2018. It's 2022 & PySimpleGUI is an
ACTIVE & supported project. Super-simple to create custom GUI's. 325+ Demo prog
rams & Cookbook for rapid start. Extensive documentation. Main docs at www.PySim
pleGUI.org. Fun & your success are the focus. Examples using Machine Learning (G
UI, OpenCV Integration), Rainmeter Style Desktop Widgets, Matplotlib + Pyplot, P
IL support, add GUI to command line scripts, PDF & Image Viewers. Great for begi
nners & advanced GUI programmers.
Home-page: https://github.com/PySimpleGUI/PySimpleGUI
Author: PySimpleGUI
Author-email: PySimpleGUI@PySimpleGUI.org
License: UNKNOWN
**Location: c:\users\hmoukala\appdata\local\programs\python\python310\lib\site-pac**
kages
Requires:
Required-by:
Quand je lance le fichier dans le terminal, il ne retrouve pas le module
hmoukala@FR00L-TC032-01 /cygdrive/d/Gui_Python
$ py Gui_test.py
Traceback (most recent call last):
File "D:\Gui_Python\Gui_test.py", line 1, in <module>
import pysimplegui as sg
ModuleNotFoundError: No module named 'pysimplegui'
Y a t’il un truc que j’ai oublié? un parametrage manquant?