Python3.9 malloc error: can’t allocate region

1、卸载 python3.9 ,安装 Python for macOS 

brew uninstall --ignore-dependencies python@3.9

 2、去官网下载

https://www.python.org/downloads/mac-osx/.

原文地址:https://www.cnblogs.com/smuzoey/p/14102910.html