gpt4 book ai didi

python - 如果我使用 pip3 安装 AWS CLI,如何修复 "dyld: Library not loaded"?

转载 作者:太空宇宙 更新时间:2023-11-03 19:54:39 24 4
gpt4 key购买 nike

我正在尝试使用 AWS CLI 部署 lambda。几个月前还可以,但现在不行了。

按照以下说明安装 CLI:https://docs.aws.amazon.com/cli/latest/userguide/install-macos.html

结果:

➜  lambda git:(master) ✗ pip3 install awscli --upgrade --user
Requirement already up-to-date: awscli in /Users/justin/Library/Python/3.7/lib/python/site-packages (1.16.310)
[... and so on, it's already installed]

➜ lambda git:(master) ✗ brew uninstall awscli
Error: No such keg: /usr/local/Cellar/awscli

➜ lambda git:(master) ✗ python --version
Python 2.7.17

➜ lambda git:(master) ✗ pip3 --version
pip 19.3.1 from /usr/local/lib/python3.7/site-packages/pip (python 3.7)

➜ lambda git:(master) ✗ python3 --version
Python 3.7.6

➜ lambda git:(master) ✗ aws --version
dyld: Library not loaded: @executable_path/../.Python
Referenced from: /usr/local/aws/bin/python2.7
Reason: image not found
[1] 42316 abort aws --version

显然我的 Python 安装有些问题。我已经在这个问题上折腾了近 45 分钟(主要是重新安装所有内容并尝试一些帖子 like this one ),但我并没有比开始时更接近解决它。

最佳答案

Chip Cullen 已修复:https://chipcullen.com/fixing-bad-interpreter-error-aws-python-3_7/

This is because you’ve probably installed awscli in the past, but more recently upgraded your system Python to version 3.7, not 3.6 (which old versions of awscli worked with).

简短版本:

brew reinstall awscli

brew link --overwrite awscli

关于python - 如果我使用 pip3 安装 AWS CLI,如何修复 "dyld: Library not loaded"?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59605991/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com