py2app 错误:“”模块“ 对象没有属性“符号链接”
我正在尝试使用 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)
有人有想法吗?
I'm trying to pack my Python app with py2app. I'm running the setup.py I created, and I get this error:
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)
Anyone has an idea?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
os.symlink
仅适用于 Unix 和类 Unix 操作系统(包括 Mac),不适用于 Windows。py2app 适用于 Mac - 您是否故意在 Windows 上运行它? 您的意思是使用 py2exe 吗?
os.symlink
is only available on Unix and Unix-like operating systems (including the Mac), not Windows.py2app is for the Mac - are you deliberately running it on Windows? Did you mean to use py2exe?