Unable to install AWS Elastic Beanstalk CLI (Win10, Python 3.6, Pip 9.0.1)

Question:

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:usersamirsappdatalocalprogramspythonpython36libsite-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

Asked By: Amir

||

Answers:

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

%USERPROFILE%AppDataLocalProgramsPythonPython36Scripts

Even though it had the other C:Usersamirs… path as well.

Answered By: Amir

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.

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%AppDataLocalProgramsPythonPython36Scripts
%USERPROFILE%AppDataRoamingPythonPython36Scripts

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

Answered By: Adrian Seeley

This PATH worked for me…

%USERPROFILE%AppDataRoamingPythonScripts;
%USERPROFILE%AppDataLocalProgramsPythonPython36Scripts;
%USERPROFILE%AppDataRoamingPythonPython36Scripts;
C:Program FilesAmazonAWSCLI
Answered By: chad steele

This worked for me:

sudo -H pip3 install awsebcli --upgrade --ignore-installed six
Answered By: Jordan Daniels

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%Anaconda3Scripts
Answered By: Yao

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: evnScriptsactivate
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 envScriptsactivate

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

C:UsersdellAppDataRoamingPythonPython310

C:UsersdellAppDataRoamingPythonPython310Scripts
Answered By: Omar A. El Sabagh

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%AppDataLocalProgramsPythonPython[YourPythonVersion]Scripts
%USERPROFILE%AppDataRoamingPythonPython[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!!

Run ‘pip install awsebcli –upgrade’

Requirement already satisfied: awsebcli in c:usersseokbappdataroamingpythonpython311site-packages (3.20.5)

since the python path = "c:users<username>appdataroamingpythonpython311"
copy & paste the Script path to env_variable Path: "c:users<username>appdataroamingpythonpython311Scripts"

Answered By: sukbu