<div dir="ltr">Hi all!<div><br></div><div>When developing qgis plugins I have usually created a python virtual environment for each plugin project in which I have installed all the necessary linting, formatting and testing tools.</div><div><br></div><div><div>Now I'm facing issues with new/next gen/testing osgeo4w based QGIS installs that are using python 3.9. I have installed `pre-commit` to my venv but it cannot run because it needs sqlite3 and it cannot be imported on the virtual environment. ImportError is raised saying that dlls cannot be found. I think that must be because Python changed the way DLLs are loaded on py38. Those are not loaded any more from PATH directories. Dll search paths are fixed in qgis.__init__.py but of course pre-commit is not aware that before importing any libraries one should import qgis first.</div></div><div><br></div><div>I have created the virtual environment with command `python-qgis.bat -m venv --system-site-packages env`. That is using python.exe from apps/Python39/ and not from bin/. Therefore python doesn't find dlls from bin/.</div><div>Is there some other way to make virtual env aware of dlls in the osgeo4w/bin/ folder?</div><div><br></div><div>Does this way of using a virtual environment during development sound reasonable anyhow?</div><div>What is your way of developing plugins?</div><div><br></div><div><br></div><div>Thanks,</div><div><br></div><div>-Lauri</div></div>