Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ModuleNotFoundError: No module named 'virtualenv' Exiting due to failure, even after virtual environment is successfully installed for AWS EBCLI

Tags:

python-3.x

I had installed AWS EB cli and I am trying to run the bundled installer using "$ .\aws-elastic-beanstalk-cli-setup\scripts\bundled_installer" below is the error I am getting not sure of addressing it.

1. Installing virtualenv
************************
Collecting virtualenv
  Using cached https://files.pythonhosted.org/packages/ca/ee/8375c01412abe6ff462ec80970e6bb1c4308724d4366d7519627c98691ab/virtualenv-16.6.0-py2.py3-none-any.whl
Installing collected packages: virtualenv
Successfully installed virtualenv-16.6.0

==============================================
II. Creating self-contained EBCLI installation
==============================================
Installing the EBCLI in C:\Users\xxcsds\.ebcli-virtual-env

******************************************
1. Creating exclusive virtualenv for EBCLI
******************************************

> Traceback (most recent call last):   File
> "c:\users\xxcsds\appdata\local\programs\python\python37\lib\runpy.py",
> line 193, in _run_module_as_main
>     "__main__", mod_spec)   File "c:\users\xxcsds\appdata\local\programs\python\python37\lib\runpy.py",
> line 85, in _run_code
>     exec(code, run_globals)   File "C:\aws-elastic-beanstalk-cli-setup\scripts\virtualenv\bin\virtualenv.exe\__main__.py",
> line 5, in <module> ModuleNotFoundError: No module named 'virtualenv'
> Exiting due to failure

like image 508
topreddy Avatar asked May 15 '19 15:05

topreddy


3 Answers

This appears to be a bug in way AWS EBCLI is installed

https://github.com/aws/aws-elastic-beanstalk-cli-setup/issues/19

use below commands

pip uninstall -y virtualenv
pip install virtualenv
python .\aws-elastic-beanstalk-cli-setup\scripts\ebcli_installer.py
like image 62
San Avatar answered Jan 31 '23 23:01

San


I've just run into the same problem. It's just workaround but you can install AWS EBCLI on virtual environment like described here. Worked for me.

like image 28
Piotrek Rudnik Avatar answered Feb 01 '23 01:02

Piotrek Rudnik


I was able to pip install awsebcli in the venv that I was working in to get things up and running.

like image 24
Den Dam Avatar answered Jan 31 '23 23:01

Den Dam