Unable to use pyinstaller

Hello forum friends, my problem is that converting a py file to exe using pyinstaller is impossible. I have tried all the methods available on the internet, not on YouTube, not on websites, and not in free forums, not in the pdf files available online. Help us and thank you in advance.

1 answer

  1. Hello,

    What version of Python?
    Why is this impossible?
    If it's not working, then you must have an error, a malfunction, you'll need to provide more details about what's happening.

    And if you can’t get it to work with PyInstaller, try with cx_Freeze, take a good look at this page where there’s a whole bunch of information.
    https://stackoverflow.com/questions/41570359/how-can-i-convert-a-py-to-exe-for-python#answer-44433442
    There’s also auto-py-to-exe to try.
    1. My version of PYTHON is 3.6. As for the problem, I couldn’t determine it before the time limit. I have already tried cx_freeze and that didn’t work for me either. Maybe the problem is not related to the program, but to my Python itself, even though I have uninstalled and reinstalled it several times. Perhaps the issue lies with the computer since I have encountered several problems that took time to resolve and I couldn't succeed, but after a long time, the problem ends up solving itself without any human intervention (which can take up to a month in most cases). So in this case, I relied on that and have been checking it for about two months in the hope that this magic will resolve itself again, but I haven’t been lucky this time. Therefore, I continued searching for solutions, hoping to find a resolution to my problem.
    2. @hajardrIt's no use reinstalling Python several times; you install it once and that's it. There's no reason for it to start malfunctioning on its own unless you delete module files.

      Okay, you have version 3.6.
      I don't know much about PyInstaller, and I've never needed to create an executable, so the documentation says it generates a myscript.spec file.
      https://pyinstaller.readthedocs.io/en/stable/usage.html

      What does yours contain when you used PyInstaller?
      What do the log files contain? (if it's not too long)

      You should try using auto-py-to-exe; it will probably be easier for you since there's a graphical interface.
      https://github.com/brentvollebregt/auto-py-to-exe
    3. @vortexRegarding your question about what happens when I use pyinstaller, I haven't had the opportunity to use it originally. As for the files I intend to convert, they are small codes like
      password = "hajardr"
      word = ""
      attempts = 0
      while word != password and attempts <3 :
      word = input("type the password here")
      attempts += 1
      if word == password :
      print("correct")
      if word != password and attempts <=3 :
      print("out of attempts")
      So, I don't think that's the problem, and I want to emphasize that I also used github, but when I put the file path there, it opened it for me via firefox and wrote those two lines for me, which I cannot write in front of them, so as not to understand their content:
      # Automatically detect text files and perform LF normalization
      • text=auto
    4. @hajardrHello,

      I don't understand much of what you're saying.

      auto-py-to-exe
      is installed with pip, which is clearly stated on the GitHub page of this module.
      You should know how to install a Python module with pip since you must have done it with pyinstaller.
      Once auto-py-to-exe is installed, you just need to launch it with the command auto-py-to-exe in your windows command prompt, and if it doesn't work (unknown command), then as stated in the readme of this module, run
      python -m auto_py_to_exe
      still in your Windows console.

      All of this is simple to do and within the reach of beginners.
      And if you can't do it, you need to detail step by step what you did and what you got, being concise in your account.