Unable to use pyinstaller

hajardr -  
 hajardr -
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 réponse

vortex
 
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.
0
hajardr
 
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.
0
vortex > hajardr
 
It'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
0
hajardr > vortex
 
Regarding 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
0
hajardr > vortex
 
but my problem is that pip does not work
0
vortex > hajardr
 
But how then did you try to use pyinstaller as well as cx_freeze without installing them?

And please, saying "it doesn't work" doesn't help at all to solve a problem. I am not going to keep pulling teeth to understand what you are doing wrong. It's up to you to describe precisely what you are doing and what is not going well.

If you had said from the beginning that you couldn't use pip, it would have avoided all this unnecessary talk.

So what happens when you run this command in your windows console (and not in the Python interpreter):
pip install auto-py-to-exe
?
Or if you run the command (if the previous one fails):
python -m pip install auto-py-to-exe
?
I expect you to copy/paste in your next message what happens in the console.
  • By the way, is your operating system Windows?
0