実現したいこと
EXEファイルを正常に実行させたい。
前提
下記コマンドでexeファイルを作成しました。
pyinstaller action.py --onefile
作成されたexeファイルを実行したところ、AかBを選択したあと下記エラーが出て、正常に動作しませんでした。
正しくexeファイルが作成できていないため、作成方法ついてを教えていただきたいです。
〈action.py〉
import easygui
import subprocess
choice = ["A", "B"]
selected_choice = easygui.buttonbox("AかBを選択してください", choice=choice)
if selected_choice == "A":
subprocess.run(["python", "example1.py"])
subprocess.run(["python", "example2.py"])
elif selected_choice == "B":
subprocess.run(["python", "example3.py"])
subprocess.run(["python", "example4.py"])
発生している問題・エラーメッセージ
python: can't open file 'C:\Users\11\dist\example1.py' : [Errno 2] No such file or directory
