aws / aws/aws-elastic-beanstalk-cli

Cannot install 3.23.1 - packaging.version.InvalidVersion: Invalid version: 'awsebcli'

Open
#546 2 comments 0 reactions 0 assignees View on GitHub
need more information
Dominant language
Python
Stars
181
Forks
88
PR merge metrics
No merged PRs in 30d

Description

### Description
Unable to install 3.23.1

### Steps to reproduce
`$ pip3 install --no-cache-dir awsebcli`

### Observed result
```
$ pip3 install --no-cache-dir awsebcli
Collecting awsebcli
Downloading awsebcli-3.23.1.tar.gz (313 kB)
Collecting botocore<2,>=1.35.0
Downloading botocore-1.37.37-py3-none-any.whl (13.5 MB)
Collecting cement==2.10.14
Downloading cement-2.10.14-py3-none-any.whl (345 kB)
Collecting colorama<0.5,>=0.4.6
Downloading colorama-0.4.6-py2.py3-none-any.whl (25 kB)
Collecting pathspec==0.12.1
Downloading pathspec-0.12.1-py3-none-any.whl (31 kB)
Collecting python-dateutil<3.0.0,>=2.1
Downloading python_dateutil-2.9.0.post0-py2.py3-none-any.whl (229 kB)
Collecting requests<3,>=2.31
Downloading requests-2.32.3-py3-none-any.whl (64 kB)
Requirement already satisfied: setuptools>=20.0 in /usr/lib/python3.8/site-packages (from awsebcli) (47.0.0)
Collecting semantic_version<2.11,>=2.10.0
Downloading semantic_version-2.10.0-py2.py3-none-any.whl (15 kB)
Collecting termcolor<3,>=2.4.0
Downloading termcolor-2.4.0-py3-none-any.whl (7.7 kB)
Collecting wcwidth<0.3,>=0.2.13
Downloading wcwidth-0.2.13-py2.py3-none-any.whl (34 kB)
Collecting PyYAML<6.1,>=5.3.1
Downloading pyyaml-6.0.2.tar.gz (130 kB)
Installing build dependencies: started
Installing build dependencies: finished with status 'done'
Getting requirements to build wheel: started
Getting requirements to build wheel: finished with status 'done'
Preparing wheel metadata: started
Preparing wheel metadata: finished with status 'done'
Collecting urllib3<2,>=1.26.5
Downloading urllib3-1.26.20-py2.py3-none-any.whl (144 kB)
Collecting packaging<25.0,>=24.2
Downloading packaging-24.2-py3-none-any.whl (65 kB)
Collecting blessed>=1.20.0
Downloading blessed-1.20.0-py2.py3-none-any.whl (58 kB)
Collecting jmespath<2.0.0,>=0.7.1
Downloading jmespath-1.0.1-py3-none-any.whl (20 kB)
Requirement already satisfied: six>=1.5 in /usr/lib/python3.8/site-packages (from python-dateutil<3.0.0,>=2.1->awsebcli) (1.15.0)
Requirement already satisfied: certifi>=2017.4.17 in /usr/lib/python3.8/site-packages (from requests<3,>=2.31->awsebcli) (2020.4.5.1)
Collecting charset-normalizer<4,>=2
Downloading charset_normalizer-3.4.1-py3-none-any.whl (49 kB)
Requirement already satisfied: idna<4,>=2.5 in /usr/lib/python3.8/site-packages (from requests<3,>=2.31->awsebcli) (2.9)
Using legacy setup.py install for awsebcli, since package 'wheel' is not installed.
Building wheels for collected packages: PyYAML
Building wheel for PyYAML (PEP 517): started
Building wheel for PyYAML (PEP 517): finished with status 'done'
Created wheel for PyYAML: filename=pyyaml-6.0.2-cp38-cp38-linux_x86_64.whl size=45359 sha256=247449b2f88bd8f284b4c[67](https://gitlab.com/...
Successfully built PyYAML
Installing collected packages: urllib3, python-dateutil, jmespath, botocore, cement, colorama, pathspec, charset-normalizer, requests, semantic-version, termcolor, wcwidth, PyYAML, packaging, blessed, awsebcli
Attempting uninstall: urllib3
Found existing installation: urllib3 1.25.9
Uninstalling urllib3-1.25.9:
Successfully uninstalled urllib3-1.25.9
Attempting uninstall: colorama
Found existing installation: colorama 0.4.3
Uninstalling colorama-0.4.3:
Successfully uninstalled colorama-0.4.3
Attempting uninstall: requests
Found existing installation: requests 2.23.0
Uninstalling requests-2.23.0:
Successfully uninstalled requests-2.23.0
Attempting uninstall: packaging
Found existing installation: packaging 20.4
Uninstalling packaging-20.4:
Successfully uninstalled packaging-20.4
Running setup.py install for awsebcli: started
Running setup.py install for awsebcli: finished with status 'error'
ERROR: Command errored out with exit status 1:
command: /usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-9oo_rcio/awsebcli/setup.py'"'"'; __file__='"'"'/tmp/pip-install-9oo_rcio/awsebcli/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-i1dupxvr/install-record.txt --single-version-externally-managed --compile --install-headers /usr/include/python3.8/awsebcli
cwd: /tmp/pip-install-9oo_rcio/awsebcli/
Complete output (31 lines):
Traceback (most recent call last):
File "", line 1, in
File "/usr/lib/python3.8/site-packages/setuptools/__init__.py", line 17, in
import setuptools.version
File "/usr/lib/python3.8/site-packages/setuptools/version.py", line 1, in
import pkg_resources
File "/usr/lib/python3.8/site-packages/pkg_resources/__init__.py", line 3262, in
def _initialize_master_working_set():
File "/usr/lib/python3.8/site-packages/pkg_resources/__init__.py", line 3245, in _call_aside
f(*args, **kwargs)
File "/usr/lib/python3.8/site-packages/pkg_resources/__init__.py", line 3274, in _initialize_master_working_set
working_set = WorkingSet._build_master()
File "/usr/lib/python3.8/site-packages/pkg_resources/__init__.py", line 575, in _build_master
ws = cls()
File "/usr/lib/python3.8/site-packages/pkg_resources/__init__.py", line 568, in __init__
self.add_entry(entry)
File "/usr/lib/python3.8/site-packages/pkg_resources/__init__.py", line 624, in add_entry
for dist in find_distributions(entry, True):
File "/usr/lib/python3.8/site-packages/pkg_resources/__init__.py", line 20[72](https://gitlab.com/...), in find_on_path
path_item_entries = _by_version_descending(filtered)
File "/usr/lib/python3.8/site-packages/pkg_resources/__init__.py", line 2045, in _by_version_descending
return sorted(names, key=_by_version, reverse=True)
File "/usr/lib/python3.8/site-packages/pkg_resources/__init__.py", line 2043, in _by_version
return [packaging.version.parse(part) for part in parts]
File "/usr/lib/python3.8/site-packages/pkg_resources/__init__.py", line 2043, in
return [packaging.version.parse(part) for part in parts]
File "/usr/lib/python3.8/site-packages/packaging/version.py", line 56, in parse
return Version(version)
File "/usr/lib/python3.8/site-packages/packaging/version.py", line 202, in __init__
raise InvalidVersion(f"Invalid version: {version!r}")
packaging.version.InvalidVersion: Invalid version: 'awsebcli'
----------------------------------------
ERROR: Command errored out with exit status 1: /usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-9oo_rcio/awsebcli/setup.py'"'"'; __file__='"'"'/tmp/pip-install-9oo_rcio/awsebcli/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-i1dupxvr/install-record.txt --single-version-externally-managed --compile --install-headers /usr/include/python3.8/awsebcli Check the logs for full command output.
```

### Expected result

Successful install

### Additional environment details (Ex: Windows, Mac, Amazon Linux etc)

1. OS: Linux
2. EBCLI version: 3.23.1

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the failure with `pip3 install --no-cache-dir awsebcli` on Linux and inspect `setup.py`, which is named in the traceback. Follow how setuptools/pkg_resources processes the awsebcli installation and packaging.version.InvalidVersion error. Done means version 3.23.1 installs successfully without the reported error.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
build-system, cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.