Help! Failed to install package 'filterpy'

Thanks for all helps above!

I changed the version of my python to 3.12.2(I didn’t use venv, but installed the newer version in another directory), and it worked. The installation of filterpy(and facexlib, which depends on filterpy) was successful, but I now encounter new problems…

As it says:

# Install basicsr - https://github.com/xinntao/BasicSR
# We use BasicSR for both training and inference
pip install basicsr
# facexlib and gfpgan are for face enhancement
pip install facexlib
pip install gfpgan
pip install -r requirements.txt
python setup.py develop

I need to install basicsr, facexlib and gfpgan. Now the installation of them is almost done, but pip warns me:

ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
basicsr 1.4.2 requires lmdb, which is not installed.
gfpgan 1.3.8 requires lmdb, which is not installed.

So I typed pip install lmdb -i https://pypi.org/simple, then something went wrong:

Collecting lmdb
  Using cached lmdb-1.4.1.tar.gz (881 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... error
  error: subprocess-exited-with-error

  × Getting requirements to build wheel did not run successfully.
  │ exit code: 1
  ╰─> [27 lines of output]
      py-lmdb: Using bundled liblmdb with py-lmdb patches; override with LMDB_FORCE_SYSTEM=1 or LMDB_PURE=1.
      Traceback (most recent call last):
        File "<string>", line 92, in <module>
      ModuleNotFoundError: No module named 'patch_ng'

      During handling of the above exception, another exception occurred:

      Traceback (most recent call last):
       ...
      Exception: Building py-lmdb from source on Windows requires the "patch-ng" python module.
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.

Missing patch-ng? I’ve installed it!

Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple
Collecting patch_ng
  Using cached https://pypi.tuna.tsinghua.edu.cn/packages/c1/b2/ad3cd464101435fdf642d20e0e5e782b4edaef1affdf2adfc5c75660225b/patch-ng-1.17.4.tar.gz (17 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Installing backend dependencies ... done
  Preparing metadata (pyproject.toml) ... done
Building wheels for collected packages: patch_ng
  Building wheel for patch_ng (pyproject.toml) ... done
  Created wheel for patch_ng: filename=patch_ng-1.17.4-py3-none-any.whl size=16101 sha256=d11742b3d41e7a2117087a629fd7624681d6b0464951432cf2d73c78b37a8228
  Stored in directory: c:\users\xxx\appdata\local\pip\cache\wheels\83\e2\18\fb2a67897706b15a5569a8a9fd3d8e5c6e24c49605da66880d
Successfully built patch_ng
Installing collected packages: patch_ng
Successfully installed patch_ng-1.17.4

Now I get a little crazy, is it normal to be so tough to deploy a working environment or install packages? Desparate to read your replies:)