The script only relies on the communex and PyYAML packages, these packages can be installed via the requirements file.
pip install -r requirements.txt
It is recommended to use your current communex virtualenv as it is unnecessary to create a new environment for a simple script.
python comdoc.py <ss58 address> <commune key>
python comdoc.py