PyCharm - RuntimeError: Cannot sign bundle (macOS Big Sur)

Viewed 172

I have finished my code, and then I tried to convert it to .dmg. I'm using Mac with macOS Big Sur. I have used this tutorial to see how I can convert the code: https://www.youtube.com/watch?v=IIAlkQEw8Gc.

I have installed py2app as it's shown in video and PyCharm's Terminal gives me this

Successfully installed altgraph-0.17 macholib-1.14 modulegraph-0.18 py2app-0.24

after that I have modified setup.py file by adding this code

from setuptools import setup

APP=['main.py']
OPTIONS = {
    'argv_emulation': True,
}

setup(
    app=APP,
    options={'py2app': OPTIONS},
    setup_requires=['py2app']
)

Then I typed in terminal python setup.py py2app and received a

RuntimeError: Cannot sign bundle '/Users/aleks/PycharmProjects/CollegeApp_Final/dist/main.app'

I have looked a bit on what terminal printed and found this error:

xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun
/Users/aleks/PycharmProjects/CollegeApp_Final/dist/main.app/Contents/Frameworks/Python.framework/Versions/3.9/Python: the codesign_allocate helper tool cannot be found or used
Traceback (most recent call last):

which repeats a lot of times.

How can I solve this problem or is there other ways to convert my code?

0 Answers
Related