¿Alguien tiene problemas para instalar Python 3.8.10 en macOS Monterey M1 Mac? Cualquier versión que intento instalar usando pyenv install me da este error:
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. Intenté casi todas las preguntas en la Búsqueda de Google sin éxito =(. Intenté instalar usando asdf python plugin and pyenv.
Esto funcionó para mí.
Instale gcc primero;
brew install gccY luego con gcc ejecuta la instalación de pyenv.
CC=/opt/homebrew/bin/gcc-11 pyenv install 3.8.10Enfrenté el mismo problema y la solución que funcionó para mí fue instalar la versión manualmente, estos son los pasos que realicé para hacerlo:
/Applications/Python 3.8Install Certificates.command , espere hasta que se complete.Update Shell Profile.commandpython3 --versionPara configurar un entorno virtual para Python versión 3.8.10 instalado manualmente:
pip install --upgrade pippip install virtualenvcd my_project_folder/virtualenv venvsource venv/bin/activatedeactivatePuede obtener más información sobre cómo configurar el entorno virtual aquí: https://virtualenv.pypa.io/en/latest/user_guide.html#