The core issue, which we debugged via chat, is that you upgraded
pip. This causes some... incompatibilities (and there's terminal dumps in the chat room from a 16.04 container to support this).
Step 1: Remove the upgraded
This one's easy, since you installed it in your local data -
pip3 uninstall pip
This will remove the version of it in your local userspace.
Step 2: Close your terminal or SSH session, then reestablish it.
This is so the session forgets about the local userspace
Step 3: Run the installation steps again for the PyPI packages you're after -
pip3 install --upgrade --user aiohttp stig (this also installs
stig, too, which you mentioned in chat was your goal)
This should install
3.4.0 (latest in PyPI as of this post) and
We did all this in chat, and it installed
aiohttp without issues. The problem with upgrading
pip versions is it will increase the chances that
pip will not work since newer
pip versions rely heavily on also having an updated Python version. And unless you are using
virtualenvs for your Python environments, you're stuck on the system's Python 3.5.2, of which the newer
pip does not behave with. (Note that this was also recognized during our tests).
Also note that
aiohttp has a requirement listed on PyPI of Python 3.5.3 or higher. This is not going to be resolved within a 16.04 environment, so you may need to resort to Python virtual environments with more updated Python, or VMs running Ubuntu 18.04, or containers (such as LXD based containers) with 18.04. This gives you a more updated Python version.