Provide a quick summary of your bug report.
not relevant
not relevant
docker run --rm -it --entrypoint=sh python:3.7pip install setuptools>=50.0.0pip install st2client==3.2.0however, when setuptools<50.0.0 was installed, st2client can be installed.
exceted st2client can be installed.
error occurs when installing
# pip install st2client==3.2.0
Collecting st2client==3.2.0
Downloading st2client-3.2.0.tar.gz (104 kB)
|鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅| 104 kB 134 kB/s
ERROR: Command errored out with exit status 1:
command: /usr/local/bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-f4z91qt3/st2client/setup.py'"'"'; __file__='"'"'/tmp/pip-install-f4z91qt3/st2client/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-o1xxfeb4
cwd: /tmp/pip-install-f4z91qt3/st2client/
Complete output (17 lines):
/usr/local/lib/python3.7/site-packages/_distutils_hack/__init__.py:30: UserWarning: Setuptools is replacing distutils.
warnings.warn("Setuptools is replacing distutils.")
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-install-f4z91qt3/st2client/setup.py", line 63, in <module>
'st2 = st2client.shell:main'
File "/usr/local/lib/python3.7/site-packages/setuptools/__init__.py", line 152, in setup
_install_setup_requires(attrs)
File "/usr/local/lib/python3.7/site-packages/setuptools/__init__.py", line 145, in _install_setup_requires
dist.parse_config_files(ignore_option_errors=True)
File "/usr/local/lib/python3.7/site-packages/setuptools/dist.py", line 665, in parse_config_files
self._parse_config_files(filenames=filenames)
File "/usr/local/lib/python3.7/site-packages/setuptools/dist.py", line 572, in _parse_config_files
filenames = self.find_config_files()
File "/usr/local/lib/python3.7/site-packages/setuptools/_distutils/dist.py", line 353, in find_config_files
sys_dir = os.path.dirname(sys.modules['distutils'].__file__)
KeyError: 'distutils'
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
@LeoQuote Thanks for the report!
We've heard new setuptools v50 broke a lot of things recently https://github.com/pypa/setuptools/issues/2350
However having st2client working in that environment would be just a matter of time requirement.
If anyone wants to work on that, - this is a good first issue, help wanted.
I'll pick this up early next week. 馃憤
Seems to be working now with 50.3.2!

@eliottha Thanks for trying and reporting back, that's helpful!
Cross-referencing related issue: https://github.com/StackStorm/st2/issues/5060
Yes, can confirm that the pip update did it and it works now. Great!
Hello, i have opened https://github.com/StackStorm/st2-dockerfiles/pull/42 which updates to latest pip when creating the docker image
@kroustou Thanks for the PR.
We however can't do that in Docker image only as other installers will still rely on a older pip version and setuptools which will lead to inconsistency issues between the environments and eventually bugs.
Instead of that, we'll need to change the pip/setuptools globally for stackstorm in core st2 repository requirements. That will then build the deb/rpm artifacts with the specified versions of tools.
See:
https://github.com/StackStorm/st2/blob/aa040bf7a8d7be6167569237abcd5bc40a02b2e5/fixed-requirements.txt#L47-L48
Then virtualenv package comes with the pinned versions of setuptools and pip, See https://virtualenv.pypa.io/en/latest/changelog.html for more info about version associations.
@armab thanks for the info - updated accordingly on https://github.com/StackStorm/st2/pull/5094