31

I am trying to install awsebcli on my machine and I am unable to run the command

eb --version

It shows this error:

'eb' is not recognized as an internal or external command,

operable program or batch file.

This is my Python version:

C:\>python --version
Python 3.6.0

This is my pip version:

C:\>pip --version
pip 9.0.1 from c:\users\amirs\appdata\local\programs\python\python36\lib\site-packages (python 3.6)

When I ran this command pip install --upgrade --user awsebcli to install awsebcli it successfully installed it.

Here are my environment variables for PATH: enter image description here

Amir
  • 2,249
  • 7
  • 34
  • 48
  • 3
    In my windows 10 laptop I just added `%USERPROFILE%\AppData\Roaming\Python\Scripts\` the the `Path` environment variable and it worked. That is because the `scripts` directory is in `%USERPROFILE%\AppData\Roaming\Python`. Maybe some other installation is inside the `%USERPROFILE%\AppData\Roaming\Python\PythonXX\` – Juan Salvador Jun 01 '17 at 14:22

10 Answers10

37

After a great deal of running around I managed to figure out that I was missing an additional PATH entry, both of these were required to get eb to run on windows:

%USERPROFILE%\AppData\Local\Programs\Python\Python36\Scripts
%USERPROFILE%\AppData\Roaming\Python\Python36\Scripts

NOTE: If you have Python 3.7 installed, change "Python36" to "Python37" in both of the path entries.

Adrian Seeley
  • 2,262
  • 2
  • 29
  • 37
  • 1
    Thanks for this... it put me on the "right" path to the right path. lol This PATH worked for me... %USERPROFILE%\AppData\Roaming\Python\Scripts; %USERPROFILE%\AppData\Local\Programs\Python\Python36\Scripts; %USERPROFILE%\AppData\Roaming\Python\Python36\Scripts; C:\Program Files\Amazon\AWSCLI – chad steele May 22 '17 at 20:42
17

This worked for me:

sudo -H pip3 install awsebcli --upgrade --ignore-installed six
Jordan Daniels
  • 4,896
  • 1
  • 19
  • 29
  • How are you using `'sudo'` in Windows? –  Dec 03 '19 at 19:19
  • 10
    It worked for me too. Just leave out the sudo -H. Run Powershell as admin and type: ```pip install awsebcli --upgrade --ignore-installed six``` – Mirza Leka Jan 25 '20 at 00:47
8

This PATH worked for me...

%USERPROFILE%\AppData\Roaming\Python\Scripts;
%USERPROFILE%\AppData\Local\Programs\Python\Python36\Scripts;
%USERPROFILE%\AppData\Roaming\Python\Python36\Scripts;
C:\Program Files\Amazon\AWSCLI
chad steele
  • 828
  • 9
  • 13
  • the `%USERPROFILE%\AppData\Roaming\Python\Scripts;` on EB documentation works for me – Shift 'n Tab Dec 12 '17 at 13:14
  • Thanks - was facing the same problem - this worked for me too . Added the following to path variable under 'user' variables:C:\Users\user\AppData\Roaming\Python\Python37\Scripts; C:\Users\user\AppData\Local\Programs\Python\Python37-32\Scripts; – satish marathe Sep 03 '18 at 02:43
4

I figured out the issue. It looks like I needed to add this to my environment variables:

%USERPROFILE%\AppData\Local\Programs\Python\Python36\Scripts

Even though it had the other C:\Users\amirs\... path as well.

Ondrej K.
  • 8,841
  • 11
  • 24
  • 39
Amir
  • 2,249
  • 7
  • 34
  • 48
3

I had the same problem these last few days.

Though the Amazon documentation does not even mention it (i.e. only the following AWS Command-Line Interface home page mentions it, but does not explain that it is required), in addition to the 'awsebcli' package (that also requires the 'boto3' package), you also need to download and install the 'aws-shell' package in order to get the command 'aws configure' to work:

https://aws.amazon.com/cli/

Click through the link for 'aws-shell' to the following GITHUB page and follow the install instructions: https://github.com/awslabs/aws-shell

Then after installation type 'aws configure' in your COMMAND WINDOW as per instructions at the following link, and it will work fine prompting you to enter the necessary AWS ACCESS KEY and SECRET ACCESS KEY:

http://boto3.readthedocs.io/en/latest/guide/quickstart.html

FYI - I tried changing the environment variable path as per your solution as well as in another link, but neither worked for me:

https://forums.aws.amazon.com/thread.jspa?threadID=228638

Thus I had to solve the issue with the true solution to the issue as detailed here.

1

If you happened to be using Conda for your Python installation, then you might have to add the following path for Elastic Beanstalk to work:

C:\Users\%USERPROFILE%\Anaconda3\Scripts
Gino Mempin
  • 25,369
  • 29
  • 96
  • 135
Yao
  • 21
  • 1
0

If the above did not work, create a virtual environment and install it there:

Install venv: pip install virtualenvironment (wherever folder you like): Create venv: python -m venv env Activate venv: windows: evn\Scripts\activate Now yes, install: pip install awsebcli --upgrade

Close the cmd, open another: Try if this work: eb --version

If this work, remember each time you want to use the command eb, you need to activate this venv, going to this path where you created the folder env, and run env\Scripts\activate

0

The paths worked for me when I set up Python to work for all users.

C:\Users\dell\AppData\Roaming\Python\Python310\

C:\Users\dell\AppData\Roaming\Python\Python310\Scripts
Amit Yadav
  • 4,422
  • 5
  • 34
  • 79
0

I Was facing the Same problem. The given answers kind of helped me, but if you have a newer version of python this may gonna help you.

Solution = CHANGE THE PATH VARIABLES. Just search at windows bar "change variables" and a option will apear.

EDIT Path, add These two Variables:

%USERPROFILE%\AppData\Local\Programs\Python\Python[YourPythonVersion]\Scripts
%USERPROFILE%\AppData\Roaming\Python\Python[YourPythonVersion]\Scripts

HINT: To be sure witch version you are using, follow this path in your windows explorer (that's what I did)

For More Information, what really helped me was the oficial documentation on section 2 -Windows: https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/eb-cli3-install-advanced.html

Hope that it would help someone!!

0

Run 'pip install awsebcli --upgrade'

Requirement already satisfied: awsebcli in c:\users\seokb\appdata\roaming\python\python311\site-packages (3.20.5) ...

since the python path = "c:\users<username>\appdata\roaming\python\python311" copy & paste the Script path to env_variable Path: "c:\users<username>\appdata\roaming\python\python311\Scripts"

sukbu
  • 71
  • 1
  • 3