如何修复通过 py2app 构建应用程序时出现的错误?
How can I fix the error which occurs while building app via py2app?
当我尝试构建部署时出现错误。
我输入了以下命令:
python3 setup.py py2app
这会导致以下错误(这是输出的最后两行):
copying file
/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.7/Resources/Python.app/Contents/MacOS/Python3
-> /Users/evrim/Desktop/code/WantedOutfits/dist/check_products.app/Contents/MacOS/python
error: [Errno 2]
/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.7/Resources/Python.app/Contents/MacOS/Python3:
'No such file or directory'
我该如何解决这个错误?
提前致谢。
py2app 目前与 Python 3.7 的副本不完全兼容 Xcode。
一个快速的解决方法是通过在同一目录中复制名为“Python”的文件来创建丢失的文件,即:
cp /Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.7/Resources/Python.app/Contents/MacOS/Python /Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.7/Resources/Python.app/Contents/MacOS/Python3
py2app 的 GitHub 跟踪器中存在此问题,我将在未来的版本中解决此问题。
当我尝试构建部署时出现错误。
我输入了以下命令:
python3 setup.py py2app
这会导致以下错误(这是输出的最后两行):
copying file /Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.7/Resources/Python.app/Contents/MacOS/Python3 -> /Users/evrim/Desktop/code/WantedOutfits/dist/check_products.app/Contents/MacOS/python error: [Errno 2] /Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.7/Resources/Python.app/Contents/MacOS/Python3: 'No such file or directory'
我该如何解决这个错误?
提前致谢。
py2app 目前与 Python 3.7 的副本不完全兼容 Xcode。
一个快速的解决方法是通过在同一目录中复制名为“Python”的文件来创建丢失的文件,即:
cp /Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.7/Resources/Python.app/Contents/MacOS/Python /Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.7/Resources/Python.app/Contents/MacOS/Python3
py2app 的 GitHub 跟踪器中存在此问题,我将在未来的版本中解决此问题。