0

So, I used to use auto-py-to-exe to create exe files. This worked great a week ago. I created a few scripts that used pandas and some other libraries. Now when I try to make something and double click the file it just opens cmd and then shuts down immediately. I even just tried making a simple hello world script that just imported pandas, printed hello, then asked for an input to pause the program. If I do that without importing pandas, the .exe works fine. If I put import pandas into the script, then the .exe will fail.

Nothing fails when I run it through spyder or anything. It just fails when I put make it an executable file.

I have uninstalled auto-py-to-exe and reinstalled it. Uninstalled pyinstaller and reinstalled. I tried completely uninstalling anaconda and libraries and reinstalling. I tried using cx_Freeze. All have the same results.

I tried using the advice here build python script to single exe with pyinstaller. Same result.

Anyone have a solution to this? I don't know why it is suddenly not working.

Also, I am a pretty noob developer here, so I imagine I am just messing something simple up, but I can't figure it out.

example of my simple script:

import pandas as pd
print('hello world')
pause = input('hit enter to end')

also if I run the program in cmd I get this error -

INTEL MKL ERROR: The specified module could not be found. mkl_intel_thread.dll. Intel MKL FATAL ERROR: Cannot load mkl_intel_thread.dll.

szabon
  • 11
  • 1
  • 2

2 Answers2

0

So, the problem was that pyinstaller wasn't finding my libraries. The solution was to create a virtual environment and launch from there. I used this setup as a guide. https://medium.com/@liron92/pyinstaller-with-pandas-problems-solutions-and-workflow-with-code-examples-c72973e1e23f Basically just create a virtual environment, pip install all the libraries you need, then launch auto-py-to-exe or pyinstaller from that environment. Problem solved.

szabon
  • 11
  • 1
  • 2
0

You should install pandas on terminal please use pip install pandas. After installing pandas try again and it will work.

T Mega
  • 1