How to properly install and use undetected_chromedriver on Debian (Python 3.11)?

I’m trying to run a script that uses undetected_chromedriver, but I keep running into this error:

ModuleNotFoundError: No module named ‘undetected_chromedriver.v2’
I’ve tried installing the module with pip install undetected-chromedriver, and it installs successfully. But the error persists. My environment:

Debian 12 (Bookworm)

Python 3.11

pip version 23+

Running inside a virtual environment

My script uses:

import undetected_chromedriver.v2 as uc
Should I be using a different import statement or version of the module? Is there a known working version for Debian or a workaround?