Problems building to native iOS using Mac Catalina with Xcode 12.4

I’m using Cocos Creator 2.4.0, XCode v12.4 on Mac Catalina and I’m trying to build my company’s game on iOS but keep getting the following message. I’ve checked both the English and Chinese forums, and I’m guessing it’s because Catalina no longer has python 2.7 as the default python.

I’ve already installed Python 2.7 and tried setting a virtualenv using pip2 as well as setting an alias to python2 but nothing seems to work so far (I’ve posted on stack overflow as well).

Has anyone using catalina faced the same problem, and if so, how did you solve it? I prefer not to upgrade to 3.0 just yet if possible.

/Applications/CocosCreator/Creator/2.4.0/ SyntaxWarning: "is not" with a literal. Did you mean "!="?
  if cls.get_cocos2d_mode() is not "distro":
Traceback (most recent call last):
  File "/Applications/CocosCreator/Creator/2.4.0/", line 1012, in <module>
    if not _check_python_version():
  File "/Applications/CocosCreator/Creator/2.4.0/", line 943, in _check_python_version
    print(MultiLanguage.get_string('COCOS_PYTHON_VERSION_TIP_FMT') % (major_ver, minor_ver))
  File "/Applications/CocosCreator/Creator/2.4.0/", line 52, in get_string
    fmt = cls.get_instance().get_current_string(key)
  File "/Applications/CocosCreator/Creator/2.4.0/", line 46, in get_instance
    cls.instance = MultiLanguage()
  File "/Applications/CocosCreator/Creator/2.4.0/", line 100, in __init__
    if self.cfg_info.has_key(cur_lang_key):
AttributeError: 'dict' object has no attribute 'has_key'

Maybe you can try installing Python 2.7 and overwriting the environment variables