Creating an executable file from a Python script
Options

OMIDMahmoodi
Posts: 3

Hi, I wrote a Python script to calculate the time decay constant for time-domain EM data, and it works well. But when I build an executable file from the Python script using cx_Freeze, I can't run the program. I get an Python error of "File NotFoundError" (attached image) caused by a file named "library.zip\geosoft\pkg_info.json".
I'd really appreciate it if anyone could help me with this.
Regards
Omid
I'd really appreciate it if anyone could help me with this.
Regards
Omid
1
Comments
-
Thanks for your responses. @IanMacLeod : copy/paste the pkg_info.json didn't solve the problem. Now, I'm trying @JacquesBeaurain 's solution. I had read that article, but I couldn't understand where I should paste the code : def find_data_file(filename): ..... .
I assume it should be in the setup.py file (the file that executes cx_Freeze). Is there any modification that should be made to the init.py for geosoft or the code: def find_data_file(filename): ?
Regards
O,0
This discussion has been closed.