1
votes

I'm trying to get AWS CLI + VSC. on my $PATH on a mac, my problem is the AWS CLI command line installation recommended I place it under ~/bin, now in here it has it's own python binary. Which is picked up first and registers fine, therefore AWS CLI executes and runs fine. The problem now comes in that my VSC usually uses a different version of python (I think?) from /usr/local/bin, but instead it's looking at ~/bin now.

So I've tried two ways, the shell installed within VSC itself and manually adding it to my ./bash_profile env. In hopes it just magically works...

The result is this:

/Applications/Visual Studio Code.app/contents/Resources/app/bin/code: line 6: /Users/<username>/bin/python: cannot execute binary file

I thought maybe I could have VSC point to usr/local/bin specifically, but I'm not sure how I would go about doing that?

tldr; I can't have AWS CLI (CLI installation) and VSC $PATH together as they both use different python versions under the same $PATH (just 'python').

Thanks in advance!

1

1 Answers

1
votes

Instead of adding /path/to/aws-cli/bin to your PATH, just create a symlink of the aws executable for example at /usr/bin/aws:

ln -s /path/to/aws-cli/bin/aws /usr/bin/aws

and make sure that /usr/bin is in your PATH instead of the /path/to/aws-cli/bin.