You need to call your venv's python executable from your subprocess as subprocess ignores venv. Add the full path of the venv's python (usually /your/path/here/Scripts/python
or your/path/here/bin/python
). You may also use sys.executable
to reference your python.