Sharma, Girish
2016-03-07 03:27:41 UTC
Hi all,
System:
Windows 7 64-bit
Anaconda 2.7 64-bit
py2exe 64-bit
Background:
I converted my python code to .exe using py2exe and setup.py file shown below:
from distutils.core import setup
import py2exe
from distutils.filelist import findall
import matplotlib
opts = {"py2exe": {
"packages" : ['matplotlib'],
"includes": ['scipy', 'scipy.integrate', 'scipy.special.*','scipy.linalg.*'],
'dll_excludes': ['libgdk-win32-2.0-0.dll',
'libgobject-2.0-0.dll',
'libgdk_pixbuf-2.0-0.dll']
}
}
setup(
windows = [{'script': "with_GUI.py"}], zipfile = None,
options= opts,
data_files = matplotlib.get_py2exe_datafiles()
)
But this gave me some error saying that there was version conflict with two files. So I changed the two files viz. dist/tcl/tcl8.5/init.tcl (in line 19) and dist/tcl/tk8.5/tk.tcl (in line 18). In my case I changed the version from 8.5.15 to 8.5.18. I found the location of the two files by looking at the path specified by the error in error log. Then the .exe worked just fine.
Problem:
I zipped the dist folder which contains .exe file. Then, I unzipped it on another computer but it is not working there. Following is the error it shows:
Traceback (most recent call last):
File "Moment_Final.py", line 5, in <module>
File "matplotlib\__init__.pyc", line 122, in <module>
File "matplotlib\cbook.pyc", line 33, in <module>
File "numpy\__init__.pyc", line 180, in <module>
File "numpy\add_newdocs.pyc", line 13, in <module>
File "numpy\lib\__init__.pyc", line 8, in <module>
File "numpy\lib\type_check.pyc", line 11, in <module>
File "numpy\core\__init__.pyc", line 14, in <module>
File "numpy\core\multiarray.pyc", line 12, in <module>
File "numpy\core\multiarray.pyc", line 10, in __load
ImportError: DLL load failed: The specified module could not be found.
Please guide me what am I missing.
System:
Windows 7 64-bit
Anaconda 2.7 64-bit
py2exe 64-bit
Background:
I converted my python code to .exe using py2exe and setup.py file shown below:
from distutils.core import setup
import py2exe
from distutils.filelist import findall
import matplotlib
opts = {"py2exe": {
"packages" : ['matplotlib'],
"includes": ['scipy', 'scipy.integrate', 'scipy.special.*','scipy.linalg.*'],
'dll_excludes': ['libgdk-win32-2.0-0.dll',
'libgobject-2.0-0.dll',
'libgdk_pixbuf-2.0-0.dll']
}
}
setup(
windows = [{'script': "with_GUI.py"}], zipfile = None,
options= opts,
data_files = matplotlib.get_py2exe_datafiles()
)
But this gave me some error saying that there was version conflict with two files. So I changed the two files viz. dist/tcl/tcl8.5/init.tcl (in line 19) and dist/tcl/tk8.5/tk.tcl (in line 18). In my case I changed the version from 8.5.15 to 8.5.18. I found the location of the two files by looking at the path specified by the error in error log. Then the .exe worked just fine.
Problem:
I zipped the dist folder which contains .exe file. Then, I unzipped it on another computer but it is not working there. Following is the error it shows:
Traceback (most recent call last):
File "Moment_Final.py", line 5, in <module>
File "matplotlib\__init__.pyc", line 122, in <module>
File "matplotlib\cbook.pyc", line 33, in <module>
File "numpy\__init__.pyc", line 180, in <module>
File "numpy\add_newdocs.pyc", line 13, in <module>
File "numpy\lib\__init__.pyc", line 8, in <module>
File "numpy\lib\type_check.pyc", line 11, in <module>
File "numpy\core\__init__.pyc", line 14, in <module>
File "numpy\core\multiarray.pyc", line 12, in <module>
File "numpy\core\multiarray.pyc", line 10, in __load
ImportError: DLL load failed: The specified module could not be found.
Please guide me what am I missing.