How can I fix a py2app error when building with py2app

南笙酒味 提交于 2021-01-29 09:44:45

问题


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.

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'

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?).

But I am not using the Xcode python


回答1:


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

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



来源:https://stackoverflow.com/questions/63600819/how-can-i-fix-a-py2app-error-when-building-with-py2app

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!