AWS Elastic Beanstalk CLI使用了错误的Python版本
我正在Mac OSX(Catalina)上尝试安装AWS Elastic Beanstalk CLIAWS Elastic Beanstalk CLI使用了错误的Python版本,python,python-3.x,amazon-web-services,amazon-elastic-beanstalk,Python,Python 3.x,Amazon Web Services,Amazon Elastic Beanstalk,我正在Mac OSX(Catalina)上尝试安装AWS Elastic Beanstalk CLI >>>python --version Python 2.7.16 >>>which python /usr/bin/python >>>python3 --version Python 3.7.5 >>>which python3 /usr/local/bin/python3 我试过的 使用Brew brew卸载awse
>>>python --version
Python 2.7.16
>>>which python
/usr/bin/python
>>>python3 --version
Python 3.7.5
>>>which python3
/usr/local/bin/python3
我试过的
使用Brew
brew卸载awsebcli
>>>brew安装awsebcli
>>>eb——版本
-bash:/Users//.local/bin/eb:/Users//projects/hello-world-flask/venv/bin/python3:错误的解释器:没有这样的文件或目录
有趣的是,hello world flask只是我的一个目录中的一个玩具示例,但我不知道EB CLI为什么要使用该venv,或者为什么它说它不存在
>>>ls /Users/<user>/projects/hello-world-flask/venv/bin/python3
/Users/<user>/projects/hello-world-flask/venv/bin/python3
ls/Users//projects/hello world flask/venv/bin/python3
/用户//projects/hello world flask/venv/bin/python3
使用Pip3
brew卸载awsebcli
>>>pip3安装awsebcli
...
已成功安装awsebcli-3.16.0
>>>eb——版本
-bash:/Users//.local/bin/eb:/Users//projects/hello-world-flask/venv/bin/python3:错误的解释器:没有这样的文件或目录
问题
我假设ebcli应该只执行python3.x。如何解决这个问题并使EB CLI使用正确版本的Python?我意识到这个答案有点晚,我自己也遇到了类似的问题。根据本文,您可能会更幸运地明确您的python可执行文件并使用--python安装标志。试试像这样的东西
python scripts/ebcli_installer.py --python-installation /path/to/some/python/on/your/computer
或者更明确地说
/path/to/your/exact/python scripts/ebcli_installer.py --python-installation /path/to/some/python/on/your/computer
这是关于的“高级使用”部分的一部分,我遇到了这个问题,但pip(重新)安装对我有效。
python scripts/ebcli_installer.py --python-installation /path/to/some/python/on/your/computer
/path/to/your/exact/python scripts/ebcli_installer.py --python-installation /path/to/some/python/on/your/computer