Ubuntu package "python3-virtualenv" accepted in step I-5, but causes step II-1 to fail
1. Please specify the following:
-
OS: Ubuntu 18.04
-
Shell: Bash
-
[X ] I have reviewed the troubleshooting tips described here and they do not solve my problem
2. Description
Attempting to install using ./aws-elastic-beanstalk-cli-setup/scripts/bundled_installer
Gives the following output:
==============================================
I. Installing Python
==============================================
*************************************************************
1. Determining whether pyenv is already installed and in PATH
*************************************************************
- pyenv found in PATH. Won't clone pyenv git repository from GitHub
*******************************************
2. Temporarily export necessary pyenv paths
*******************************************
****************************************************************************
3. Checking whether Python can be downloaded (through curl, wget, or aria2c)
****************************************************************************
************************************************************
4. Installing Python 3.7.2. This step may take a few minutes
************************************************************
- Python 3.7.2 is installed at /home/username/.pyenv/versions/3.7.2/bin
***************************************************************************
5. Installing virtualenv using /home/username/.pyenv/versions/3.7.2/bin/pip
***************************************************************************
Requirement already satisfied: virtualenv in /home/username/.local/lib/python3.7/site-packages (16.7.5)
WARNING: You are using pip version 19.2.3, however version 19.3.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
==============================================
II. Creating self-contained EBCLI installation
==============================================
******************************************
1. Creating exclusive virtualenv for EBCLI
******************************************
/bin/sh: 1: /home/username/.pyenv/versions/3.7.2/bin/virtualenv: not found
Exiting due to failure
It looks like the Ubuntu system installed python3-virtualenv is acceptable for part of the installation process, but this causes problems later.
@Toruitas
Thanks for reporting the problem. At first glance, it looks like a bug in the bundle_installer in that it assumes a virtualenv executable exists under the pip that was installed in the first phase. A solution would be to use the virtualenv that already exists. The problem using a virtualenv that already exists is that it could be really old and thus incompatible with the scripts in this package. Another solution is to insist that virtualenv be install within the new pip regardless of whether it already exists on the system.
For the time being, you can simply run the ebcli_installer.py file in the package using the Python you installed in the first phase:
/home/username/.pyenv/versions/3.7.2/bin/python ./scripts/ebcli_installer.py
Thanks, @rahulrajaram ! I tried that and it ended up hanging at Installing setuptools, pip, wheel... I uninstalled all versions of virtualenv (v16.0.0 and 16.7.5) which were in /home/username/.local/lib/python3.7/site-packages/ and ran the first bundled_installer again. It installed virtualenv anew (this time in /home/username/.pyenv/versions/3.7.2/bin/) and completed successfully.
So there's some discordance between the pyenv managed Python installation and their usage of any system-level installations of Python packages.
tried that and it ended up hanging at
Installing setuptools, pip, wheel...
That's strange. Did a rerun not fix the issue?
... and completed successfully.
That's great.
Yes, this issue requires a deeper look.