Once in the file I just kept changing the URL until I could get it to work correctly. This is why in the path there is the first '/mnt' and the rest is self explanatory. I use Hyper for a terminal and in that terminal I have it set up to default to the zsh shell installed on WSL. Just looking at this path I could tell this was the problem. The very first line, (see screenshot below), of the file starts with #!/mnt/c/Users/Matth/AppData/Local/Programs/Python/Python37/Scripts/aws. That told me it was using the WSL installed version of python.Īt this point I was able to trace the path back to C:\Users\Matth\AppData\Local\Programs\Python\Python37\Scripts\aws where the actual awscli file lived. Once I figured out which python instance it was attempting to use by issuing the which python command, it returned /usr/bin/python. Finally, it dawned on me that I had installed python on Windows as well as on WSL. As you can see from the screenshot, I tried just about every different combination trying to get it to find the file. This was throwing things off and it could not find the file. On Windows the path is represented this way: C:\Users\Matth\AppData\Local and on Linux the path is represented /usr/bin/python. The Windows file system displays its path to a file differently than Linux.
I was able to recognize a few patterns all the 'solutions' had in common and just started trying different things. As you can see from the screenshot I use ZSH as my shell of choice instead of Bash so this was throwing me off some too. Attempting to decipher those results was difficult since there seemed to be so many different 'solutions' depending on all the different environment setups.
Aws cli install windows vs ubuntu mac#
I got a lot of Mac related results and a few that referred to Windows. My first thought is what does this even mean! 'Bad interpreter - no such file' - WHAT? The file is there. Now I looked at the bad interpreter: portion of the error message. I traced the file location and confirmed there is actually such a file. The last thing the error says is: no such file or directory, so this is where I started. No matter what I did I seemed to continue getting this error. Being able to interact with these services via CLI is imperative for me.Īfter installing the awscli to Ubuntu WSL, I continued to get the same error as shown in the screenshot above. I use their S3 storage as well as CloudFront, and Route 53, and a few other services. This allows you to interact with AWS or Amazon Web Services. I installed pip, Node, NPM, GIT, and all the other stuff I was using at the time onto WSL. I have set up dual boot machines as well as virtual machines before and the explanations I read made it sound like it favored these kinds of an environment. Since WSL is similar to a virtual machine or a distro all to itself - or a 'subsystem' - I was not sure if I could share these tools between the two environments. I made sure python 2.X.X and 3.X.X were installed on WSL. I wanted to use WSL for all of the things I had just loaded on my machine through PowerShell, so I had to duplicate a lot of my work. Since Linux is what I was used to and felt most comfortable with, I set out to install WSL. After installing all of this through PowerShell I realized after poking around, that I could have a Linux 'environment' called Windows Subsystem Linux.
After that, I installed NPM and a variety of other tools including the awscli, WSL, GIT, and a few more. After installing python, both versions, 2.X.X and 3.X.X, as well as pip, since they are two different programs, I made sure to do it right and add it to my 'path' or Windows environment variables so it can be found. Not sure if this makes a difference but I at least want to be able to duplicate my environment in case anyone else is struggling with this. I use Python for a variety of things as well as the Python package installer, pip, so when I started with this computer I installed them right away. For instance, Python comes already installed and ready to use on Linux. When I first started using this machine as my primary developer machine, I came from Linux, which has a lot of tools installed by default that Windows does not. I struggled for a while attempting to find the correct answer as to why I kept getting an error after installing the Amazon Web Services Command Line Interface, or awscli on WSL. On WSL, I am using the Ubuntu flavor, version 18.04, though this should not have any impact on what we are about to do.
Aws cli install windows vs ubuntu windows 10#
To start off, I am using Windows 10 OS which is updated to its most recent updates, I also have Windows Subsystem Linux, (WSL), installed.