I don’t believe the virtual environment is itself causing the issue, but I guess packages are not installed correctly.
Could you post a minimal code snippet reproducing the issue raised only in a virtual env?