19.10 pip for python 3.8

In order to make sure you are using the correct pip, please use it as follows:

python3.8 -m pip install pyinotify

Brett Cannon, one of the Python core developers, just recently published a blog article about this topic: https://snarky.ca/why-you-should-use-python-m-pip/

This all said, you usually want to install Python packages into a virtual environment, not in the system Python.

https://realpython.com/python-virtual-environments-a-primer/


sudo apt install python3-pip or python3.8-pip .

Let the system manage your Python version.


Edit:

The original question was trying to install pip via python -m pip, and after the original poster used apt, the system package manager, instead, they were able to get pip working correctly.

As noted in the comments and in jugmac00's answer, it is now recommended to use pip by calling as a Python module:

python -m pip install pyinotify

If multiple versions of Python are installed on the system and this isn't the default version, you may need to specify the version:

python3.8 -m pip install pyinotify