我正在学习Python。我有一个python脚本,可以从用户那里获取输入。如果我在pycharm
中运行这个脚本,我将得到所需的输出,但得到的是"RuntimeError: input(): lost sys.stdin" this error in .exe file which I converter with pyinstaller.
请指导我如何运行我的.exe文件与用户输入。下面是我的代码
import pandas as pd
import openpyxl
import sys
downloaded_file = input("Enter Downloaded file name: ")
customer_file = input("Enter Customer file name: ")
df_portal = pd.read_excel(f"{downloaded_file}.xls")
df_customer_zyme = pd.read_excel(f"{customer_file}.xlsx")
1条答案
按热度按时间6yt4nkrj1#
您可能需要使用“console”选项构建您的pyinstaller:
https://pyinstaller.org/en/stable/usage.html#cmdoption-c