takluyver / pynsist

Build Windows installers for Python applications
https://pynsist.readthedocs.io/
Other
896 stars 119 forks source link

Tkinter #153

Closed MatheusDantas closed 6 years ago

MatheusDantas commented 6 years ago

Hello people,

I have an application on python and visual studio(C#).

I created an .exe in python and I'm trying to run this .exe from visual studio code using the diagnostic.process. When I do this I have the following message:

"import _tkinter # if this fails your Python may not be configured for TK" "ImportError: DLL load failed: It wasn't possible to find the following module."

The thing is... When I run the .exe by myself or in prompt it works really fine, otherwise when is my visual studio program trying to run, this error start to pop up.

I would be glad if someone could help. I'm stuck on this.

thank you very much, I wish good day and good work for all of you.

takluyver commented 6 years ago

How did you make the exe? Generally, the only exe that Pynsist makes is the installer, which is probably not what you're trying to run.

MatheusDantas commented 6 years ago

Takluyver thanks for the answer and sorry about took to long,

Right now I'm using cx_Freeze library to create the .exe file, as I said the .exe is working fine, but when I invoke the .exe from the method diagnostic.process from C# the erro of the Tkinter start to popup.

The problem is not solve yet, what I'm trying to do is create the .exe of python using the Pyinstaller that you mentioned, but I'm with some problems to import my library as matplotlib and numpy to the .exe file. Also when I run the exe of the Pyinstaller it's open and immediatly close(But those are other problems).

What I can't understand is, why my .exe file works when I click on it and when I invoke from the visual studio don't. This is really crazy. Others .exe programs are running fine, only mine don't. Sheiße :P

takluyver commented 6 years ago

Sorry, this is the issue tracker for Pynsist - you'll need to go elsewhere to get answers about exes built by cx_Freeze or Pyinstaller.

MatheusDantas commented 6 years ago

No problems, thank you very much takluyver,

I could solve using the Pyinstaller instead of the cx_Freeze, also it was possible to add the librarys that was missing before and it worked really fine :DDDD

That was a great victory hahhahahahaha. I'm still don't know what was happening with the cx_Freezer but I'll not worry about that anymore.

Thank you very much again, good day and good work!