I have basic knowledge of python and using coding rarely
I have a problem with a specific situation when I want to convert my python code to an ".exe" file using pyinstaller. My code has openpyxl library and when I tried to convert it to .exe file, I can't do it. I simplified the problem and shared an example different code that I have the same problem with.
I did some trials looking at some suggestions on the internet, and my final status is I can create an exe file writing "pyinstaller test.py" and it works great. But as you know it creates a mess of hundreds of files, but I want to give the program to my professor. So I want to have a just ".exe" file. So I used on command prompt "pyinstaller --onefile test.py". But it does NOT work. I am grateful for your help in advance.
from openpyxl import Workbook
a = int(input("a: "))
b = int(input("b: "))
wb = Workbook()
ws = wb["Sheet"]
ws.cell(1,1).value = a+b
with open("deneme.txt","w") as f:
f.write("{} + {} = {}".format(a, b, a+b))
wb.save(filename="deneme.xlsx")
question from:
https://stackoverflow.com/questions/65878278/error-with-openpyxl-and-pyinstaller-with-onefile 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…