aws / aws-elastic-beanstalk-cli-setup

Simplified EB CLI installation mechanism.
Apache License 2.0
512 stars 226 forks source link

Running the installer doesn't tell me how to set PATH for macOS, contrally to what README tells me #131

Open ShunyaWatanabe opened 2 years ago

ShunyaWatanabe commented 2 years ago

1. Please specify the following:

2. Description

On README it says that 'On Linux and macOS, the output contains instructions to add the EB CLI (and Python) executable file to the shell's $PATH variable, if it isn't already in it.' but I don't get the instruction when running the installer. Below is what I get instead

~/dev ❯❯❯ python ./aws-elastic-beanstalk-cli-setup/scripts/ebcli_installer.py

***********************************
1. Locating virtualenv installation
***********************************

******************************************
2. Creating exclusive virtualenv for EBCLI
******************************************
/Users/shunyawatanabe/.ebcli-virtual-env/bin/python: replacing existing signature
created virtual environment CPython2.7.18.final.0-64 in 142ms
  creator CPython2macOsArmFramework(dest=/Users/shunyawatanabe/.ebcli-virtual-env, clear=False, no_vcs_ignore=False, global=False)
  seeder FromAppData(download=False, pip=bundle, setuptools=bundle, wheel=bundle, via=copy, app_data_dir=/Users/shunyawatanabe/Library/Application Support/virtualenv)
    added seed packages: pip==20.3.4, setuptools==44.1.1, wheel==0.37.1
  activators BashActivator,CShellActivator,FishActivator,NushellActivator,PowerShellActivator,PythonActivator

************************
3. Activating virtualenv
************************

*******************
4. Installing EBCLI
*******************
supermario commented 2 years ago

Also ran into this with the same output as above.

After trying to debug the install script and getting nowhere, thought to maybe try it with python3 instead, which gave completely different output:

$ python3 scripts/ebcli_installer.py

***********************************
1. Locating virtualenv installation
***********************************

******************************************
2. Creating exclusive virtualenv for EBCLI
******************************************
created virtual environment CPython3.9.12.final.0-64 in 706ms
  creator CPython3Posix(dest=/Users/mario/.ebcli-virtual-env, clear=False, no_vcs_ignore=False, global=False)
  seeder FromAppData(download=False, pip=bundle, setuptools=bundle, wheel=bundle, via=copy, app_data_dir=/Users/mario/Library/Application Support/virtualenv)
    added seed packages: pip==22.0.4, setuptools==62.1.0, wheel==0.37.1
  activators BashActivator,CShellActivator,FishActivator,NushellActivator,PowerShellActivator,PythonActivator

************************
3. Activating virtualenv
************************

*******************
4. Installing EBCLI
*******************
Collecting awsebcli
  Downloading awsebcli-3.20.3.tar.gz (259 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 259.2/259.2 KB 642.3 kB/s eta 0:00:00
  Preparing metadata (setup.py) ... done
Collecting botocore<1.24.0,>1.23.41
  Downloading botocore-1.23.54-py3-none-any.whl (8.5 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 8.5/8.5 MB 1.2 MB/s eta 0:00:00

...snip...

Installing collected packages: wcwidth, texttable, termcolor, future, docopt, certifi, cement, cached-property, urllib3, six, semantic_version, PyYAML, pyrsistent, pycparser, pathspec, jmespath, idna, colorama, charset-normalizer, attrs, websocket-client, requests, python-dateutil, jsonschema, dockerpty, cffi, blessed, pynacl, docker, cryptography, botocore, bcrypt, paramiko, docker-compose, awsebcli
Successfully installed PyYAML-5.4.1 attrs-21.4.0 awsebcli-3.20.3 bcrypt-3.2.0 blessed-1.19.1 botocore-1.23.54 cached-property-1.5.2 cement-2.8.2 certifi-2021.10.8 cffi-1.15.0 charset-normalizer-2.0.12 colorama-0.4.3 cryptography-36.0.2 docker-4.4.4 docker-compose-1.25.5 dockerpty-0.4.1 docopt-0.6.2 future-0.16.0 idna-3.3 jmespath-0.10.0 jsonschema-3.2.0 paramiko-2.10.3 pathspec-0.9.0 pycparser-2.21 pynacl-1.5.0 pyrsistent-0.18.1 python-dateutil-2.8.2 requests-2.26.0 semantic_version-2.8.5 six-1.14.0 termcolor-1.1.0 texttable-1.6.4 urllib3-1.26.9 wcwidth-0.1.9 websocket-client-0.59.0

***********************
5. Creating EB wrappers
***********************

***************
6. Finishing up
***************
Success!

    Note: To complete installation, ensure `eb` is in PATH. You can ensure this by executing:

    1. Bash:

       echo 'export PATH="/Users/mario/.ebcli-virtual-env/executables:$PATH"' >> ~/.bash_profile && source ~/.bash_profile

    2. Zsh:

       echo 'export PATH="/Users/mario/.ebcli-virtual-env/executables:$PATH"' >> ~/.zshenv && source ~/.zshenv

I don't know much about Python 2/3 differences to help further, but I hope this helps someone else in the interim.

NB: python3 was installed via brew install python3.

arunesh commented 1 year ago

I had the same issue. Fixed by forcing python3 on macOS. Make sure your python3 directory is on the PATH. Install virtualenv using pip3.

Also check python3 --version to ensure > 3.5