Step 1
pip in the virtualenv seems broken, so bootstrap pip:
curl https://bootstrap.pypa.io/pip/3.5/get-pip.py | .tox/py35-django18/bin/python -
Step 2
Now I get this error
ERROR: Command errored out with exit status 1:
command: /home/guettli/foobar/projects/foobar_addressbook/.tox/py35-django18/bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-xsbc7r69/django-celery_63fa83d5391f499a9cc375c1c1fed8b6/setup.py'"'"'; __file__='"'"'/tmp/pip-install-xsbc7r69/django-celery_63fa83d5391f499a9cc375c1c1fed8b6/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-6esk_zf9
cwd: /tmp/pip-install-xsbc7r69/django-celery_63fa83d5391f499a9cc375c1c1fed8b6/
Complete output (7 lines):
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/home/guettli/foobar/projects/foobar_addressbook/.tox/py35-django18/lib/python3.5/site-packages/setuptools/__init__.py", line 18, in <module>
import setuptools.version
File "/home/guettli/foobar/projects/foobar_addressbook/.tox/py35-django18/lib/python3.5/site-packages/setuptools/version.py", line 1, in <module>
import pkg_resources
ImportError: No module named 'pkg_resources'
To fix this:
.tox/py35-django18/bin/python -m pip install -U setuptools
Now the virtualenv of tox is working.
If you know an easier way to get Python3.5 working on Ubuntu 21.10, please leave a comment. Thank you.