invalid syntax from calling pip3 from console

I wanted to upgrade my system image from fishandchips to haggis. I'm running python 3.8 on both. Flask no longer works. As part of the troubleshooting, I thought I'd investigate the packages with pip3, however, all pip3 calls from the console results in the following (sorry for formatting):

14:50 ~ $ pip3 --version

Traceback (most recent call last): File "/home/{user}/.local/bin/pip3", line 5, in <module> from pip._internal.cli.main import main

File "/usr/local/lib/python3.8/dist-packages/pip/_internal/cli/", line 9, in <module> from pip._internal.cli.autocompletion import autocomplete

File "/usr/local/lib/python3.8/dist-packages/pip/_internal/cli/", line 10, in <module> from pip._internal.cli.main_parser import create_main_parser

File "/usr/local/lib/python3.8/dist-packages/pip/_internal/cli/", line 8, in <module> from pip._internal.cli import cmdoptions

File "/usr/local/lib/python3.8/dist-packages/pip/_internal/cli/", line 23, in <module> from pip._internal.cli.parser import ConfigOptionParser

File "/usr/local/lib/python3.8/dist-packages/pip/_internal/cli/", line 12, in <module> from pip._internal.configuration import Configuration, ConfigurationError

File "/usr/local/lib/python3.8/dist-packages/pip/_internal/", line 27, in <module> from pip._internal.utils.misc import ensure_dir, enum

File "/usr/local/lib/python3.8/dist-packages/pip/_internal/utils/", line 38, in <module> from pip._vendor.tenacity import retry, stop_after_delay, wait_fixed

File "/usr/local/lib/python3.8/dist-packages/pip/_vendor/tenacity/", line 520, in <module> from pip._vendor.tenacity._asyncio import AsyncRetrying

File "/usr/local/lib/python3.8/dist-packages/pip/_vendor/tenacity/", line 19, in <module> from asyncio import sleep

File "/home/{user}/.local/lib/python3.8/site-packages/asyncio/", line 21, in <module> from .base_events import *

File "/home/{user}/.local/lib/python3.8/site-packages/asyncio/", line 296 future = tasks.async(future, loop=self) ^

SyntaxError: invalid syntax

That looks like you have somehow installed broken packages into your .local diretory. Delete ~/.local/lib/python3.8 and everything should work again.

I was finally able to implement the fix, and I wanted to report that this indeed did work. Thank you very much!

Thanks for letting us know!