我目前有一个Python脚本,正在尝试使用py2app
编译成Mac OSX应用程序。在我的游戏中,我有两个包含游戏图像的文件,分别为data
和resources
。我正在使用以下安装脚本
# setup.py
from setuptools import setup
DATA_FILES = ['data','resources']
setup(
app=["mygame.py"],
data_files=DATA_FILES,
setup_requires=["py2app"],
)
如果我执行别名,如:
python3 setup.py py2app -A
游戏运行。但是,我想要一个独立的版本。当我跑步时:
python3 setup.py py2app
这会产生以下错误:
Modules not found (conditional imports):
* ConfigParser (numpy.distutils.npy_pkg_config, numpy.distutils.system_info)
* Dialog (OpenGL.Tk)
* Numeric (numpy.distutils.system_info)
* OpenGL_accelerate.arraydatatype (OpenGL.arrays.arraydatatype, OpenGL.arrays.arrayhelpers, OpenGL.converters)
* OpenGL_accelerate.buffers_formathandler (OpenGL.arrays.buffers)
* OpenGL_accelerate.errorchecker (OpenGL.error)
* OpenGL_accelerate.latebind (OpenGL.latebind, OpenGL.wrapper)
* OpenGL_accelerate.nones_formathandler (OpenGL.arrays.nones)
* OpenGL_accelerate.numpy_formathandler (OpenGL.arrays.numpymodule)
* OpenGL_accelerate.vbo (OpenGL.arrays.vbo)
* OpenGL_accelerate.wrapper (OpenGL.arrays.arrayhelpers, OpenGL.converters, OpenGL.wrapper)
* Py25Queue (pygame.threads)
* Queue (numpy.fft.tests.test_fftpack, pygame.threads)
* StringIO (numpy.core.tests.test_print, numpy.distutils.tests.test_exec_command, numpy.lib.format, numpy.lib.tests.test_regression, numpy.lib.tests.test_utils, numpy.lib.utils, numpy.testing._private.utils, pkg_resources._vendor.six)
* Tkinter (OpenGL.Tk)
* _distutils_findvs (distutils._msvccompiler)
* _manylinux (setuptools.pep425tags)
* cPickle (numpy.core.numeric, numpy.lib.format, numpy.lib.npyio, numpy.ma.core)
* cStringIO (pygame.compat)
* com (pkg_resources._vendor.appdirs)
* com.sun.jna (pkg_resources._vendor.appdirs)
* com.sun.jna.platform (pkg_resources._vendor.appdirs)
* commands (numpy.distutils.cpuinfo)
* copy_reg (numpy.core, pygame)
* dummy_thread (numpy.core.arrayprint)
* f2py2e (numpy.f2py.__main__)
* future_builtins (numpy.lib.npyio, numpy.lib.recfunctions)
* md5 (numpy.core.tests.test_regression)
* nose (numpy.testing._private.decorators, numpy.testing._private.utils, numpy.testing.tests.test_decorators, numpy.testing.tests.test_doctesting)
* nose.plugins (numpy.testing._private.nosetester)
* nose.plugins.builtin (numpy.testing._private.nosetester)
* numarray (numpy.distutils.system_info)
* numpy_distutils (numpy.f2py.diagnose)
* numpy_distutils.command.build_flib (numpy.f2py.diagnose)
* numpy_distutils.command.cpuinfo (numpy.f2py.diagnose)
* numpy_distutils.cpuinfo (numpy.f2py.diagnose)
* numpy_distutils.fcompiler (numpy.f2py.diagnose)
* pygame._view ()
* pytest (numpy.testing._private.pytesttester)
* scipy (numpy.testing._private.nosetester)
* thread (numpy.core.arrayprint)
* urllib2 (numpy.lib._datasource, numpy.lib.tests.test__datasource)
* urlparse (numpy.lib._datasource, numpy.lib.tests.test__datasource)
* win32com (pkg_resources._vendor.appdirs)
* win32com.shell (pkg_resources._vendor.appdirs)
* win32pdh (numpy.testing._private.utils)
* wincertstore (setuptools.ssl_support)
Modules with syntax errors:
* OpenGL.GL.SGIX.async
我真的不确定该怎么办。我已经安装了所有这些模块,却不知道为什么要抱怨。有人知道为什么吗?