使用py2app构建时如何解决py2app错误 [英] How can I fix a py2app error when building with py2app

查看:160
本文介绍了使用py2app构建时如何解决py2app错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

尝试使用py2app和pyenv构建一个简单的wxpython应用程序.我从运行应用程序的地方创建了一个虚拟环境,并使用py2app进行了构建.在构建没有这样的文件或目录"时,它失败.错误.

Trying to build a simple wxpython app using py2app and using pyenv. I created a virtual environment from whence I run the application and build with py2app. It fails during building on a "no such file or directory" error.

复制文件/Users/humberto.a.sanchez.ii/.pyenv/versions/3.8.5/Resources/Python.app/Contents/MacOS/Python ->/Users/humberto.a.sanchez.ii/PycharmProjects/gittodoistclone/dist/PyGitIssueClone.app/Contents/MacOS/python错误:[Errno 2]/Users/humberto.a.sanchez.ii/.pyenv/versions/3.8.5/Resources/Python.app/Contents/MacOS/Python:没有此类文件或目录"

copying file /Users/humberto.a.sanchez.ii/.pyenv/versions/3.8.5/Resources/Python.app/Contents/MacOS/Python -> /Users/humberto.a.sanchez.ii/PycharmProjects/gittodoistclone/dist/PyGitIssueClone.app/Contents/MacOS/python error: [Errno 2] /Users/humberto.a.sanchez.ii/.pyenv/versions/3.8.5/Resources/Python.app/Contents/MacOS/Python: 'No such file or directory'

我从未见过py2app复制这样的文件或目录.任何帮助将不胜感激.

I have never seen py2app copying such a file or directory. Any help would be appreciated.

我在这里看到了类似的内容(

I saw something similar here (How can I fix the error which occurs while building app via py2app?).

但是我没有使用Xcode python

But I am not using the Xcode python

推荐答案

好,我发现了问题所在.当我 pyenv安装 python的3.8.5版本时,我没有设置此环境变量.

Ok, I found out what the problem was. When I pyenv installed the 3.8.5 version of python, I had not set this environment variable.

PYTHON_CONFIGURE_OPTS=--enable-framework

因此,一旦我将其卸载并使用上述选项 py2app 重新安装,它就会再次开始正常工作.谜团解决了.

So once I uninstalled it and re-installed with the above option py2app started working correctly again. Mystery solved.

这篇关于使用py2app构建时如何解决py2app错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆