Qt 5.15.8 failed to compile for iOS platform on macos 12.3
-
Due to Python2.7 removal from macos 12.3 I have this error message when trying to build project:
/bin/sh: /Users/user/Qt/5.15.8/ios/mkspecs/features/uikit/devices.py: /usr/bin/python: bad interpreter: No such file or directory
Any suggestions on how to resolve this?
-
Solution found by replacing the first line
/usr/bin/python
with externally installed Python2.7 location
/Users/user/.pyenv/versions/2.7.18/bin/python2.7
in the "devices.py" file
-
just switched to Montery 12.3.1 and run into this bug.
/usr/bin/python: bad interpreter
at usr/bin I found /usr/bin/python3
so I changed first line of devices.py from
#!/usr/bin/python into #!/usr/bin/python3
but this doesn't work
any idea ? -
with a little help from https://stackoverflow.com/questions/71739870/how-to-install-python-2-on-macos-12-3/71740144 I downloaded and installed Python 2.7.
then in5.15.7/ios/mkspeks/features/uikit/devices.py
I changed first line from
#!/usr/bin/python
into
#!/usr/local/bin/python
… and I’m able to compile and build iOS apps again :)
thx @MiTem