Skip to content

Python file works in Jupyter Notebook but not after embedded in pyinstaller #5543

Answered by rokm
jou-hui asked this question in Help
Discussion options

You must be logged in to vote

FileNotFoundError: [Errno 2] No such file or directory: 'Downloads/Exhaust_Fan_Design_Data.xlsx'
xlsxwriter.exceptions.FileCreateError: [Errno 2] No such file or directory: 'Downloads/Exhaust_Fan_Design_Data.xlsx'

I think the error message is quite self-explanatory - the program cannot find the .xlsx file in the given relative path. Which means that in frozen program, the working directory is not where you think it is (or where it was for the Jupyter Notebook).

So either you need to use absolute file paths (if this is supposed to be an external file), or anchor your relative paths to application's directory (as per docs).

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@jou-hui
Comment options

Answer selected by jou-hui
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
2 participants