I have a working game developed on codeskulptor simplegui tools. I converted it to pygame though SimpleGUICS2Pygame. I tried to convert it to exe, it ran this error: [Errno 2] No such file or directory: 'numpy-atlas.dll'
I looked into this thread:Py2Exe, [Errno 2] No such file or directory: 'numpy-atlas.dll'
I tried copying the numpy-atlas.dll to the code file directory, It worked, but when I tried to run the exe file, the command line just pops out and disappear.
I found the last answer to work, though I don't know how/where to run such a code:
from distutils.core import setup
import py2exe
import numpy
import os
import sys
# add any numpy directory containing a dll file to sys.path
def numpy_dll_paths_fix():
paths = set()
np_path = numpy.__path__[0]
for dirpath, _, filenames in os.walk(np_path):
for item in filenames:
if item.endswith('.dll'):
paths.add(dirpath)
sys.path.append(*list(paths))
numpy_dll_paths_fix()
setup(...)
I recompiled it using pyinstaller, it succeeded, but no functionality, here is what the spec file looks like:
# -*- mode: python -*-
block_cipher = None
a = Analysis(['balling.py'],
pathex=['C:\\Users\\SamsunG\\Desktop\\Python 2017\\convert'],
binaries=[],
datas=[],
hiddenimports=[],
hookspath=[],
runtime_hooks=[],
excludes=[],
win_no_prefer_redirects=False,
win_private_assemblies=False,
cipher=block_cipher)
pyz = PYZ(a.pure, a.zipped_data,
cipher=block_cipher)
exe = EXE(pyz,
a.scripts,
exclude_binaries=True,
name='balling',
debug=False,
strip=False,
upx=True,
console=True )
coll = COLLECT(exe,
a.binaries,
a.zipfiles,
a.datas,
strip=False,
upx=True,
name='balling')