0

I wrote a program where I imported those lib :

from math import*
from pylab import*
import numpy as np

import matplotlib
import matplotlib.backends.backend_tkagg
import numpy as np
import matplotlib.pyplot as plt

and I wanted to make an executable out of it (the .py already runs using pylab) so in the Windows terminal (in the Python's script folder) I did the command cxfreeze solver.py : this creates a solver.exe in Dist folder.

When I tried to run this executable, there is :

File "C:\Users\*****\AppData\Local\Programs\Python\Python35-32\lib\tkinter\__init__.py", line 35, in <module>
    import _tkinter # If this fails your Python may not be configured for Tk
ImportError: DLL load failed: Le module spécifié est introuvable.

In english : the specified module is not found

I read several help on the site and on internet but it nerver fixed it, and after few days of searching I begin to give up. Please help !

John
  • 303
  • 4
  • 13
  • Can you show us your `setup.py` file? Also, did you specify libraries you want to include? – Laszlowaty Dec 18 '16 at 23:02
  • 1
    I did it directly from the terminal without using a setup file. I read it should work too normaly. Do you think I should make a setup file ? – John Dec 18 '16 at 23:04
  • 1
    Definetely. Often automatic detection doesn't work properly. [Here](http://cx-freeze.readthedocs.io/en/latest/distutils.html) you can find nice few-lines tutorial. – Laszlowaty Dec 18 '16 at 23:05
  • Now it says `KeyError: 'TCL_LIBRARY'`am I obliged to specify the directory of those lib every time I lounch a new terminal ? – John Dec 18 '16 at 23:17
  • Try solution from [this topic](http://stackoverflow.com/questions/35533803/keyerror-tcl-library-when-i-use-cx-freeze) – Laszlowaty Dec 18 '16 at 23:21
  • It creates a `.exe` but again, it doesn't work because of the same problem as in my first post. :( – John Dec 18 '16 at 23:34

0 Answers0