最佳答案
我对 openssl 和 python@2都有意见。记录在案的重新安装 Python 和 openssl 的解决方案不起作用,所以我决定卸载并重新安装 Python。
问题是,当您尝试使用 brew 安装 Python2时,会收到以下消息:
brew install python@2
Error: No available formula with the name "python@2"
==> Searching for a previously deleted formula (in the last month)...
Warning: homebrew/core is shallow clone. To get complete history run:
git -C "$(brew --repo homebrew/core)" fetch --unshallow
python@2 was deleted from homebrew/core in commit 028f11f9e:
python@2: delete (https://github.com/Homebrew/homebrew-core/issues/49796)
EOL 1 January 2020.
We gave it 1 month more to live so that people had time to migrate.
All in all, developers had 11 years to do their migration.
You can use the `brew extract` command and maintain python@2 in your own
tap if necessary:
https://docs.brew.sh/How-to-Create-and-Maintain-a-Tap
To show the formula before removal run:
git -C "$(brew --repo homebrew/core)" show 028f11f9e^:Formula/python@2.rb
If you still use this formula consider creating your own tap:
https://docs.brew.sh/How-to-Create-and-Maintain-a-Tap
不幸的是,我还有一些依赖于 Brew 的 python@2的酿酒公式。这些包括 awscli
,letsencrypt
,pr sshuttle
等
aws
zsh: /usr/local/bin/aws: bad interpreter: /usr/local/opt/python@2/bin/python2.7: no such file or directory
我不知道如何使用他们记录的 brew extract
命令重新安装 Python@2。它需要配方和水龙头。我想公式应该是 python@2
。我不确定监听器是什么。
此外,重新安装水龙头,如 aws
或 letsencrypt
也不是工作得很好。
在重新安装 awscli
(brew reinstall awscli
)之后,运行 aws 命令仍然会出现错误。
aws
/usr/local/Cellar/awscli/2.0.0/libexec/lib/python3.8/site-packages/jmespath/visitor.py:32: SyntaxWarning: "is" with a literal. Did you mean "=="?
if x is 0 or x is 1:
/usr/local/Cellar/awscli/2.0.0/libexec/lib/python3.8/site-packages/jmespath/visitor.py:32: SyntaxWarning: "is" with a literal. Did you mean "=="?
if x is 0 or x is 1:
/usr/local/Cellar/awscli/2.0.0/libexec/lib/python3.8/site-packages/jmespath/visitor.py:34: SyntaxWarning: "is" with a literal. Did you mean "=="?
elif y is 0 or y is 1:
/usr/local/Cellar/awscli/2.0.0/libexec/lib/python3.8/site-packages/jmespath/visitor.py:34: SyntaxWarning: "is" with a literal. Did you mean "=="?
elif y is 0 or y is 1:
/usr/local/Cellar/awscli/2.0.0/libexec/lib/python3.8/site-packages/jmespath/visitor.py:260: SyntaxWarning: "is" with a literal. Did you mean "=="?
if original_result is 0:
usage: aws [options] <command> <subcommand> [<subcommand> ...] [parameters]
To see help text, you can run:
aws help
aws <command> help
aws <command> <subcommand> help
aws: error: the following arguments are required: command