3
votes

I'm on a Mac OSX (Catalina) trying to install the 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

What I've tried

Using Brew

>>>brew uninstall awsebcli   
>>>brew install awsebcli
>>>eb --version
-bash: /Users/<user>/.local/bin/eb: /Users/<user>/projects/hello-world-flask/venv/bin/python3: bad interpreter: No such file or directory

Now the funny thing is that hello-world-flask is just a toy example I have in one of my directories, but I have no idea why the EB CLI is trying to use that venv, or why it says that it doesn't exist.

>>>ls /Users/<user>/projects/hello-world-flask/venv/bin/python3
/Users/<user>/projects/hello-world-flask/venv/bin/python3

Using Pip3

>>>brew uninstall awsebcli 
>>>pip3 install awsebcli
...
Successfully installed awsebcli-3.16.0
>>>eb --version
-bash: /Users/<user>/.local/bin/eb: /Users/<user>/projects/hello-world-flask/venv/bin/python3: bad interpreter: No such file or directory

The Question

I'm assuming the EB CLI is just supposed to execute Python 3.x. How do I fix this and make the EB CLI use the correct version of Python?

1
I had this issue but pip (re)installing worked for me.Dan

1 Answers

0
votes

I realize this answer is a bit late and ran into a similar issue myself. According to this you might have better luck being explicit about your python executable and using the --python-installation flag. Try something like

python scripts/ebcli_installer.py --python-installation /path/to/some/python/on/your/computer

or to be extra explicit

/path/to/your/exact/python scripts/ebcli_installer.py --python-installation /path/to/some/python/on/your/computer

This is part of the "Advanced Use" section on the EB CLI github