Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

EB CLI installing with Python 2 rather than Python 3

My system as Python 2.7 and 3.7 installed. I have attempted to install the EB CLI connected to Python 3 but the CLI tool seems only to connect to the 2.7 installation.

Attempt 1

When I run $ brew install awsebcli I get a version of EB that seems to be associated with 2.7, which is incorrect:

$ eb --version EB CLI 3.14.4 (Python 2.7.1)

Attempt 2

When I attempt to install EB CLI using pip, the installation appears fine but I am unable to access EB.

$eb --version -bash: eb: command not found

The docs suggest this might be to do with not having the path in the .bash_profile I've set up, however I have added the following to my .bash_profile and reloaded the .bash_profile:

# Adding path to Elastic Beanstalk CLI export Path=/Library/Python/3.7/bin:$PATH

like image 608
Will Taylor Avatar asked Nov 20 '25 07:11

Will Taylor


1 Answers

The other way to use it is to install awsebcli in virtualenv with python 3.7.

if you dont have virtualenv install it first.

pip install virtualenv 

then make virtualenv with python 3.7

virtualenv -p python3.7 <name of virtualenv>

activate this virtualenv

cd <name of virtualenv>
source bin/activate 

Now install awsebcli,

pip install awsebcli

This virtualenv will now have python3.7 as default python version.

like image 95
GraphicalDot Avatar answered Nov 21 '25 20:11

GraphicalDot



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!