This seems to be the issue of library version mismatch. I think use are using different version in code then the installed venv version. Try to match them on the same version and this will also work.
venv