FileNotFoundError: [Errno 2] No such file or directory: .constants.json
问题 I have coded a python script involving excel sheet manipulation using openpyxl . Script is running fine using python interpreter. Once I have made single windows executable using pyinstaller and running the program, its throwing error: FileNotFoundError: [Errno 2] No such file or directory: 'C:\\Users\\....\\AppData\\Local\\Temp\\_MEI31842\\.constants.json' Any suggestion? 回答1: You might need to tell PyInstaller to include this file: Put a file hook-openpyxl.py in the directory from where you