.exe avec python

Fermé
Xzylak - 28 nov. 2022 à 21:20
mamiemando Messages postés 33284 Date d'inscription jeudi 12 mai 2005 Statut Modérateur Dernière intervention 25 septembre 2024 - 30 nov. 2022 à 19:46

Bonjour,

je voulais avoir mon code python en .exe mais ça m'affiche ça est ce que quelqu'un pourrais m'aider svp je ne sais pas comment résoudre le problème


Windows / Firefox 107.0

A voir également:

9 réponses

mamiemando Messages postés 33284 Date d'inscription jeudi 12 mai 2005 Statut Modérateur Dernière intervention 25 septembre 2024 7 787
Modifié le 29 nov. 2022 à 18:22

Bonjour,

En réponse au message #16, tu as la réponse en toutes lettres :-)

WARNING: The scripts auto-py-to-exe.exe and autopytoexe.exe are installed in 'C:\Users\21ant\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\Scripts' which is not on PATH.
Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location

Tu dois donc ajouter le dossier C:\Users\21ant\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\Scripts dans ton PATH comme expliqué dans ce lien.

set PATH="%PATH%;C:\Users\21ant\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\Scripts"

Teste. Si ça marche, comme expliqué dans le lien précédent, utilise la commande suivante pour ajouter ce dossier définitivement dans ton PATH :

setx path "%PATH%;C:\Users\21ant\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\Scripts"

Bonne chance

4
Diablo76 Messages postés 203 Date d'inscription vendredi 25 novembre 2022 Statut Membre Dernière intervention 19 septembre 2024 44
29 nov. 2022 à 18:32

Je n'avais pas vu ta réponse, mais effectivement si il n'est pas dans le PATH....

0

Merci beaucoup mais je n'arrive pas à le mettre dans le path avec l'aide de ton lien... est ce qu'il serais possible que tu me dise exactement ce que je dois écrire dans le terminal ?

merci d'avance

1
mamiemando Messages postés 33284 Date d'inscription jeudi 12 mai 2005 Statut Modérateur Dernière intervention 25 septembre 2024 7 787 > Xzylak
30 nov. 2022 à 15:15

J'ai écrit explicitement les deux commandes dans mon message #18.

  • Ajout temporaire (pour tester)
set PATH="%PATH%;C:\Users\21ant\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\Scripts"

... vérifie que le PATH comporte désormais le dossier ajouté :

echo %PATH%

... et si c'est le cas tente de lancer ton logiciel :

auto-py-to-exe
  • Ajout pour les prochaines fois (une fois que le test a fonctionné) :
setx path "%PATH%;C:\Users\21ant\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\Scripts"

Bonne chance

0
Xzylak > mamiemando Messages postés 33284 Date d'inscription jeudi 12 mai 2005 Statut Modérateur Dernière intervention 25 septembre 2024
30 nov. 2022 à 17:45

Merci beaucoup, j'en suis infiniment reconnaissant c'est super gentil de votre part.

J'ai enfin reusi

A bientot

Bonne continuation

0
mamiemando Messages postés 33284 Date d'inscription jeudi 12 mai 2005 Statut Modérateur Dernière intervention 25 septembre 2024 7 787 > Xzylak
30 nov. 2022 à 19:46

Bravo à toi et bonne continuation !

0
Diablo76 Messages postés 203 Date d'inscription vendredi 25 novembre 2022 Statut Membre Dernière intervention 19 septembre 2024 44
29 nov. 2022 à 08:52

Salut,

Comment as-tu installé auto-py-to-exe ?

1

Je l'ai installé dans le terminal avec :

pip install auto-py-to-exe

C'est pour ça je ne comprends pas pourquoi ça ne fonctionne pas 

0
Diablo76 Messages postés 203 Date d'inscription vendredi 25 novembre 2022 Statut Membre Dernière intervention 19 septembre 2024 44
29 nov. 2022 à 09:34

Est-ce qu'il apparait bien dans ta liste de packages ?

pip list
0
mamiemando Messages postés 33284 Date d'inscription jeudi 12 mai 2005 Statut Modérateur Dernière intervention 25 septembre 2024 7 787
29 nov. 2022 à 11:22

Bonjour,

En complément ce serait bien que tu indiques ce qu'on retournées les commandes que tu as utilisé pour installer auto-py-to-exe en suivant la procédure d'installation.

Bonne chance

0

Vous n’avez pas trouvé la réponse que vous recherchez ?

Posez votre question

Le problème c'est que ça ne m'affiche pas dans la console comme sur la procédure d'installation alors que j'ai fait exactement pareil ...

0
mamiemando Messages postés 33284 Date d'inscription jeudi 12 mai 2005 Statut Modérateur Dernière intervention 25 septembre 2024 7 787
29 nov. 2022 à 15:23

Peux-tu copier coller le résultat de la commande :

pip install auto-py-to-exe

Merci de ne pas faire une capture d'écran, ton terminal permet de faire un copier coller (via l'icône en haut à gauche dans si tu utilises les commandes MS-DOS).

0

Quand je le fais ça me dit qu'il à déjà tout télécharger 

0

Voulez vous que je vous envoie ce que ça m'affiche ?

0
mamiemando Messages postés 33284 Date d'inscription jeudi 12 mai 2005 Statut Modérateur Dernière intervention 25 septembre 2024 7 787 > Xzylak
Modifié le 29 nov. 2022 à 18:08

Oui mais au préalable désinstalle auto-py-to-exe :

pip uninstall auto-py-to-exe

Puis copie colle le résultat de :

pip install auto-py-to-exe

Je suppose qu'ainsi où sont installés les fichiers et en particulier l'exécutable auto-py-to-exe. En effet, soit le paquet est mal installé, soit l'exécutable est stocké dans un dossier qui n'est pas référencé dans PATH de ton terminal windows.

echo %PATH%

Dans ce cas il faudra y ajouter le dossier dans lequel se trouve l'exécutable de auto-py-to-exe comme expliqué dans ce lien.

Indique-nous également quelle est la version de ton interpréteur python :

python --version

Bonne chance

1
Xzylak > mamiemando Messages postés 33284 Date d'inscription jeudi 12 mai 2005 Statut Modérateur Dernière intervention 25 septembre 2024
29 nov. 2022 à 18:08

D'accord je vais essayer de le désinstaller puis de le réinstaller 

0
Xzylak > mamiemando Messages postés 33284 Date d'inscription jeudi 12 mai 2005 Statut Modérateur Dernière intervention 25 septembre 2024
29 nov. 2022 à 18:13

après avoir fais cela ça n'a toujours pas fonctionné... lors de l'installation ça m'affiche cela :

 pip install auto-py-to-exe
Collecting auto-py-to-exe
  Downloading auto_py_to_exe-2.26.0-py2.py3-none-any.whl (101 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 101.0/101.0 KB 132.1 kB/s eta 0:00:00
Requirement already satisfied: pyinstaller>=4.6 in c:\users\21ant\appdata\local\packages\pythonsoftwarefoundation.python.3.9_qbz5n2kfra8p0\localcache\local-packages\python39\site-packages (from auto-py-to-exe) (5.6.2)
Requirement already satisfied: Eel==0.14.0 in c:\users\21ant\appdata\local\packages\pythonsoftwarefoundation.python.3.9_qbz5n2kfra8p0\localcache\local-packages\python39\site-packages (from auto-py-to-exe) (0.14.0)
Requirement already satisfied: bottle in c:\users\21ant\appdata\local\packages\pythonsoftwarefoundation.python.3.9_qbz5n2kfra8p0\localcache\local-packages\python39\site-packages (from Eel==0.14.0->auto-py-to-exe) (0.12.23)
Requirement already satisfied: bottle-websocket in c:\users\21ant\appdata\local\packages\pythonsoftwarefoundation.python.3.9_qbz5n2kfra8p0\localcache\local-packages\python39\site-packages (from Eel==0.14.0->auto-py-to-exe) (0.2.9)
Requirement already satisfied: future in c:\users\21ant\appdata\local\packages\pythonsoftwarefoundation.python.3.9_qbz5n2kfra8p0\localcache\local-packages\python39\site-packages (from Eel==0.14.0->auto-py-to-exe) (0.18.2)
Requirement already satisfied: pyparsing in c:\users\21ant\appdata\local\packages\pythonsoftwarefoundation.python.3.9_qbz5n2kfra8p0\localcache\local-packages\python39\site-packages (from Eel==0.14.0->auto-py-to-exe) (3.0.9)
Requirement already satisfied: whichcraft in c:\users\21ant\appdata\local\packages\pythonsoftwarefoundation.python.3.9_qbz5n2kfra8p0\localcache\local-packages\python39\site-packages (from Eel==0.14.0->auto-py-to-exe) (0.6.1)
Requirement already satisfied: setuptools in c:\program files\windowsapps\pythonsoftwarefoundation.python.3.9_3.9.3568.0_x64__qbz5n2kfra8p0\lib\site-packages (from pyinstaller>=4.6->auto-py-to-exe) (58.1.0)
Requirement already satisfied: pywin32-ctypes>=0.2.0 in c:\users\21ant\appdata\local\packages\pythonsoftwarefoundation.python.3.9_qbz5n2kfra8p0\localcache\local-packages\python39\site-packages (from pyinstaller>=4.6->auto-py-to-exe) (0.2.0)
Requirement already satisfied: altgraph in c:\users\21ant\appdata\local\packages\pythonsoftwarefoundation.python.3.9_qbz5n2kfra8p0\localcache\local-packages\python39\site-packages (from pyinstaller>=4.6->auto-py-to-exe) (0.17.3)
Requirement already satisfied: pyinstaller-hooks-contrib>=2021.4 in c:\users\21ant\appdata\local\packages\pythonsoftwarefoundation.python.3.9_qbz5n2kfra8p0\localcache\local-packages\python39\site-packages (from pyinstaller>=4.6->auto-py-to-exe) (2022.13)
Requirement already satisfied: pefile>=2022.5.30 in c:\users\21ant\appdata\local\packages\pythonsoftwarefoundation.python.3.9_qbz5n2kfra8p0\localcache\local-packages\python39\site-packages (from pyinstaller>=4.6->auto-py-to-exe) (2022.5.30)
Requirement already satisfied: gevent-websocket in c:\users\21ant\appdata\local\packages\pythonsoftwarefoundation.python.3.9_qbz5n2kfra8p0\localcache\local-packages\python39\site-packages (from bottle-websocket->Eel==0.14.0->auto-py-to-exe) (0.10.1)
Requirement already satisfied: gevent in c:\users\21ant\appdata\local\packages\pythonsoftwarefoundation.python.3.9_qbz5n2kfra8p0\localcache\local-packages\python39\site-packages (from gevent-websocket->bottle-websocket->Eel==0.14.0->auto-py-to-exe) (22.10.2)
Requirement already satisfied: zope.event in c:\users\21ant\appdata\local\packages\pythonsoftwarefoundation.python.3.9_qbz5n2kfra8p0\localcache\local-packages\python39\site-packages (from gevent->gevent-websocket->bottle-websocket->Eel==0.14.0->auto-py-to-exe) (4.5.0)
Requirement already satisfied: cffi>=1.12.2 in c:\users\21ant\appdata\local\packages\pythonsoftwarefoundation.python.3.9_qbz5n2kfra8p0\localcache\local-packages\python39\site-packages (from gevent->gevent-websocket->bottle-websocket->Eel==0.14.0->auto-py-to-exe) (1.15.1)
Requirement already satisfied: zope.interface in c:\users\21ant\appdata\local\packages\pythonsoftwarefoundation.python.3.9_qbz5n2kfra8p0\localcache\local-packages\python39\site-packages (from gevent->gevent-websocket->bottle-websocket->Eel==0.14.0->auto-py-to-exe) (5.5.2)
Requirement already satisfied: greenlet>=2.0.0 in c:\users\21ant\appdata\local\packages\pythonsoftwarefoundation.python.3.9_qbz5n2kfra8p0\localcache\local-packages\python39\site-packages (from gevent->gevent-websocket->bottle-websocket->Eel==0.14.0->auto-py-to-exe) (2.0.1)
Requirement already satisfied: pycparser in c:\users\21ant\appdata\local\packages\pythonsoftwarefoundation.python.3.9_qbz5n2kfra8p0\localcache\local-packages\python39\site-packages (from cffi>=1.12.2->gevent->gevent-websocket->bottle-websocket->Eel==0.14.0->auto-py-to-exe) (2.21)
Installing collected packages: auto-py-to-exe
  WARNING: The scripts auto-py-to-exe.exe and autopytoexe.exe are installed in 'C:\Users\21ant\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\Scripts' which is not on PATH.
  Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
Successfully installed auto-py-to-exe-2.26.0
WARNING: You are using pip version 22.0.4; however, version 22.3.1 is available.
You should consider upgrading via the 'C:\Users\21ant\AppData\Local\Microsoft\WindowsApps\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\python.exe -m pip install --upgrade pip' command.
0
Diablo76 Messages postés 203 Date d'inscription vendredi 25 novembre 2022 Statut Membre Dernière intervention 19 septembre 2024 44
Modifié le 29 nov. 2022 à 16:47

Si tu tapes:

pip show auto-py-to-exe

que t'affiche pip ?

0

ça m'affiche ça des trucs mais je ne peux pas l'envoyer sur le forum je ne sais pas pourquoi... il y a la version, la licence etc...

0
Diablo76 Messages postés 203 Date d'inscription vendredi 25 novembre 2022 Statut Membre Dernière intervention 19 septembre 2024 44
29 nov. 2022 à 17:59

Ok ce qui m'intéresse c'est la Location quelque chose comme :

Location: /Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages

Car j'ai l'impression que tu as plusieurs version de python...

0

ah d'accord tien:

Location: c:\users\21ant\appdata\local\packages\pythonsoftwarefoundation.python.3.9_qbz5n2kfra8p0\localcache\local-packages\python39\site-packages

plusieurs versions ?

0
Diablo76 Messages postés 203 Date d'inscription vendredi 25 novembre 2022 Statut Membre Dernière intervention 19 septembre 2024 44
Modifié le 29 nov. 2022 à 18:12

Oui, moi j'ai 4 versions d'installées (3.7, 3.9, 3.10, 3.11) pour différents tests.

Tapes maintenant :

python -V
0
Xzylak > Diablo76 Messages postés 203 Date d'inscription vendredi 25 novembre 2022 Statut Membre Dernière intervention 19 septembre 2024
29 nov. 2022 à 18:14

ça m'affiche :

Python 3.9.13
0