![](/img/trans.png)
[英]Firebase Android resource generation error in Firebase Unity SDK due to Python 2.7 being removed in macOS 12.3 Monterey
[英]Issues installing Python 3.8.10 on macOS 12.3 Monterey
有人在 macOS Monterey M1 Mac 上安装 python 3.8.10 时遇到问题吗? 我尝试使用pyenv install
的任何版本都会给我这个错误:
python-build: use openssl@1.1 from homebrew python-build: use readline from homebrew Downloading Python-3.8.10.tar.xz... -> https://www.python.org/ftp/python/3.8.10/Python-3.8.10.tar.xz Installing Python-3.8.10... python-build: use readline from homebrew python-build: use zlib from xcode sdk
BUILD FAILED (OS X 12.3 using python-build 20180424)
Inspect or clean up the working tree at /var/folders/yg/s2w3pfj172v6kdwx7hvmq65m0000gn/T/python-build.20220322155830.88129 Results logged to /var/folders/yg/s2w3pfj172v6kdwx7hvmq65m0000gn/T/python-build.20220322155830.88129.log
Last 10 log lines: checking for --with-cxx-main=<compiler>... no checking for clang++... no configure:
By default, distutils will build C++ extension modules with "clang++". If this is not intended, then set CXX on the configure command line.
checking for the platform triplet based on compiler characteristics... darwin configure: error: internal configure error for the platform triplet, please file a bug report make: *** No targets specified and no makefile found. Stop.
我在 Google 搜索中尝试了几乎所有问题,但都没有成功 =(。我尝试使用asdf python plugin and pyenv.
Apple 引入了一项导致其崩溃的更改。
在您的特定情况下pyenv install 3.8.13
应该可以工作。
对于不同版本的其他人应该检查这个线程
或使用任何这些版本 3.7.13、3.8.13、3.9.11 和 3.10.3
brew install gcc && CC=`which gcc-11` pyenv install 3.8.10
它不需要用brew
安装gcc
! 它可能会让你陷入更多麻烦!
Apple Command Line Tools
中有一个捆绑的gcc
,您可以通过以下命令找到它:
which gcc
注意不要在gcc
中添加任何版本特定编号! 像gcc-11
或gcc-12
等等。然后检查找到的gcc
位于/Library/Developer/CommandLineTools/
目录下。 所需的 output 将是这样的:
$ which gcc
/Library/Developer/CommandLineTools/usr/bin/gcc
如果一切正常,意味着您运行简单which gcc
命令并找到gcc
并且找到的路径位于/Library/Developer/CommandLineTools/
目录下,您可以使用以下命令安装pyenv
CC=`which gcc` pyenv install 3.8.6
您可以安装任何可用且您需要的 python 版本。
如果您遇到任何问题,请发表评论,这可能有助于我们使答案更加清晰和对您有所帮助。
我遇到了同样的问题。 我意识到我的 pyenv 版本已经过时了。 我通过运行使用自制软件更新了它:
brew install pyenv
然后运行
pyenv install 3.10.6
完美地工作。
我帮助:
brew install gcc@11
后:
CC=`which gcc-11` pyenv install 3.8.12
我遇到了同样的问题,对我有用的解决方案是手动安装版本,以下是我为完成它而执行的步骤:
/Applications/Python 3.8
Install Certificates.command
,等待它完成。Update Shell Profile.command
python3 --version
要为手动安装的 python 版本 3.8.10 设置虚拟环境:
pip install --upgrade pip
pip install virtualenv
cd my_project_folder/
virtualenv venv
source venv/bin/activate
deactivate
您可以在此处获取有关设置虚拟环境的更多信息: https://virtualenv.pypa.io/en/latest/user_guide.html#
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.