py2app 错误:“”模块“ 对象没有属性“符号链接”

发布于 2024-07-30 04:48:37 字数 1105 浏览 10 评论 0原文

我正在尝试使用 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

べ繥欢鉨o。 2024-08-06 04:48:37

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?

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文