.exe avec python

Xzylak -  
mamiemando Messages postés 33228 Date d'inscription   Statut Modérateur Dernière intervention   -

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

9 réponses

  1. mamiemando Messages postés 33228 Date d'inscription   Statut Modérateur Dernière intervention   7 944
     

    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
    1. Diablo76 Messages postés 344 Date d'inscription   Statut Membre Dernière intervention   140
       

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

      0
    2. Xzylak
       

      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
      1. mamiemando Messages postés 33228 Date d'inscription   Statut Modérateur Dernière intervention   7 944 > Xzylak
         

        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
      2. Xzylak > mamiemando Messages postés 33228 Date d'inscription   Statut Modérateur Dernière intervention  
         

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

        J'ai enfin reusi

        A bientot

        Bonne continuation

        0
      3. mamiemando Messages postés 33228 Date d'inscription   Statut Modérateur Dernière intervention   7 944 > Xzylak
         

        Bravo à toi et bonne continuation !

        0
  2. Diablo76 Messages postés 344 Date d'inscription   Statut Membre Dernière intervention   140
     

    Salut,

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

    1
    1. Xzylak
       

      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
  3. Diablo76 Messages postés 344 Date d'inscription   Statut Membre Dernière intervention   140
     

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

    pip list
    0
  4. mamiemando Messages postés 33228 Date d'inscription   Statut Modérateur Dernière intervention   7 944
     

    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
  5. Vous n’avez pas trouvé la réponse que vous recherchez ?

    Posez votre question
  6. Xzylak
     

    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
  7. mamiemando Messages postés 33228 Date d'inscription   Statut Modérateur Dernière intervention   7 944
     

    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
    1. Xzylak
       

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

      0
    2. Xzylak
       

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

      0
      1. mamiemando Messages postés 33228 Date d'inscription   Statut Modérateur Dernière intervention   7 944 > Xzylak
         

        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
      2. Xzylak > mamiemando Messages postés 33228 Date d'inscription   Statut Modérateur Dernière intervention  
         

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

        0
      3. Xzylak > mamiemando Messages postés 33228 Date d'inscription   Statut Modérateur Dernière intervention  
         

        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
  8. Diablo76 Messages postés 344 Date d'inscription   Statut Membre Dernière intervention   140
     

    Si tu tapes:

    pip show auto-py-to-exe

    que t'affiche pip ?

    0
  9. Xzylak
     

    ç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
    1. Diablo76 Messages postés 344 Date d'inscription   Statut Membre Dernière intervention   140
       

      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
  10. Xzylak
     

    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
    1. Diablo76 Messages postés 344 Date d'inscription   Statut Membre Dernière intervention   140
       

      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
      1. Xzylak > Diablo76 Messages postés 344 Date d'inscription   Statut Membre Dernière intervention  
         

        ça m'affiche :

        Python 3.9.13
        0