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.

2
  • Does import pandas raise an exception? Commented Mar 13, 2020 at 15:21
  • not in Spyder. It just seems to break when I make it an exe. Commented Mar 13, 2020 at 16:00

2 Answers 2

1

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.

Sign up to request clarification or add additional context in comments.

Comments

0

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

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.