我正在尝试用py2app打包我的Python应用程序。我正在运行我创建的setup.py,我收到此错误:
Traceback (most recent call last):
File "C:\Python26\lib\site-packages\py2app-0.3.6-py2.6.egg\py2app\build_app.py
", line 548, in _run
self.run_normal()
File "C:\Python26\lib\site-packages\py2app-0.3.6-py2.6.egg\py2app\build_app.py
", line 619, in run_normal
self.create_binaries(py_files, pkgdirs, extensions, loader_files)
File "C:\Python26\lib\site-packages\py2app-0.3.6-py2.6.egg\py2app\build_app.py
", line 710, in create_binaries
target, arcname, pkgexts, copyexts, target.script)
File "C:\Python26\lib\site-packages\py2app-0.3.6-py2.6.egg\py2app\build_app.py
", line 1067, in build_executable
self.symlink('../../site.py', os.path.join(pydir, 'site.py'))
File "C:\Python26\lib\site-packages\py2app-0.3.6-py2.6.egg\py2app\build_app.py
", line 377, in symlink
os.symlink(src, dst)
AttributeError: 'module' object has no attribute 'symlink'
> c:\python26\lib\site-packages\py2app-0.3.6-py2.6.egg\py2app\build_app.py(377)s
ymlink()
-> os.symlink(src, dst)
有人有想法吗?
答案 0 :(得分:1)
os.symlink
仅适用于Unix和类Unix操作系统(包括Mac),而不适用于Windows。
py2app适用于Mac - 您是故意在Windows上运行吗?您的意思是使用py2exe吗?