python - OSX 上“arch”的意外输出(使用 Mac M1 安装弹性 bean)
问题描述
尝试在 MacBook Air M1 上安装弹性 bean 时,使用以下命令:
% ./aws-elastic-beanstalk-cli-setup/scripts/bundled_installer
如此处所示的指南: https ://github.com/aws/aws-elastic-beanstalk-cli-setup
我收到以下错误:
5. Installing Python 3.7.2. This step may take a few minutes
************************************************************
python-build: use openssl from homebrew
python-build: use readline from homebrew
Downloading Python-3.7.2.tar.xz...
-> https://www.python.org/ftp/python/3.7.2/Python-3.7.2.tar.xz
Installing Python-3.7.2...
python-build: use readline from homebrew
BUILD FAILED (OS X 11.1 using python-build 20180424)
Inspect or clean up the working tree at /var/folders/2v/7tdwpjsd3jzdw75jmp2n5trh0000gn/T/python-build.20201225141032.70517
Results logged to /var/folders/2v/7tdwpjsd3jzdw75jmp2n5trh0000gn/T/python-build.20201225141032.70517.log
Last 10 log lines:
checking size of _Bool... 1
checking size of off_t... 8
checking whether to enable large file support... no
checking size of time_t... 8
checking for pthread_t... yes
checking size of pthread_t... 8
checking size of pthread_key_t... 8
checking whether pthread_key_t is compatible with int... no
configure: error: Unexpected output of 'arch' on OSX
make: *** No targets specified and no makefile found. Stop.
Exiting due to failure
感谢您的帮助!!!
解决方案
以上都不适合我。我为 Apple Silicon 和 Intel 安装了 brew:
arch -x86_64 /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
然后从以下位置安装 pyenv:
/usr/local/Homebrew/bin/brew install pyenv
/usr/local/Homebrew/bin/brew link pyenv
arch -x86_64 pyenv install 3.8.9
那行得通
编辑
正如 Cheesus 在评论中指出的那样,似乎唯一要做的就是最后一行:
arch -x86_64 pyenv install 3.8.9
推荐阅读
- mysql - NULL 时加入 (mysql)
- sql - 即使 RIGHT 值不存在,也返回 LEFT 值
- react-native - req.body undefined axios.get in react-native
- solr - solr 多值动态字段索引没有多个值
- ios - 在用户在“设置”应用中切换通知之前,iOS Firebase 云消息传递无法正常工作
- docker - 创建构建时出现 Docker 登录错误
- ios - 引用资产目录并从框架中包含它是否会创建重复?
- python - 如何确定函数的参数是否与上次调用不同
- git - 如何退出(不中止)正在进行的 Git 合并,保持更改未提交?
- ruby-on-rails - 如何使用外键备份多个表中的特定行,然后从大型数据库中恢复完整的关系?