I have recently upgraded to Python 3 with brew
. My awscli has stopped working because it is trying to use the old version of Python. I would like to try to reinstall it, but currently I am not able to uninstall it.
➜ ~ python --version
Python 3.6.4
➜ ~ aws confgure
zsh: /usr/local/bin/aws: bad interpreter: /usr/local/opt/python/bin/python2.7: no such file or directory
➜ ~ pip uninstall awscli
Cannot uninstall requirement awscli, not installed
➜ ~ pip3 uninstall awscli
Cannot uninstall requirement awscli, not installed
➜ ~ brew uninstall awscli
Error: No such keg: /usr/local/Cellar/awscli
➜ ~ aws configure
zsh: /usr/local/bin/aws: bad interpreter: /usr/local/opt/python/bin/python2.7: no such file or directory
➜ ~ which aws
/usr/local/bin/aws
What else can I try to uninstall awscli?
The installer installs the AWS CLI at /usr/local/aws and creates the symlink aws at the /usr/local/bin directory. The command uses the -b parameter to specify the directory where the installer places the aws symlink file. You must have write permissions to the specified directory.
To Install the AWS CLI version 1, use the pip3 command (if you use Python version 3 or later) or the pip command. Verify that the AWS CLI version 1 is installed correctly. If there is no response, see the Add the AWS CLI version 1 executable to your command line path section.
As homebrew say when trying to uninstall/install awscli:
rm /usr/local/bin/aws
brew link awscli
Almost, that worked for me.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With