Python code debug: execution going to base interpreter in C: drive instead of venv for pkg_resources [ Pycharm ]

24 Views Asked by At

When I'm running the code in usual run mode, it goes into the correct venv folder which is in the root directory of project itself.

While during debug mode, it goes into the code for base interpreter which is leading to error because we expect to pick up some drivers which will only happen if we read from venv package code.

This is happening for package pkg_resources which comes with setuptools

Actual code snippet which leads to error.

Looks like for pkg_resources, instead of going into venv it goes directly to base python file which leads to the driver unavailable issues

Any suggestion on how to resolve this ?

TIA

0

There are 0 best solutions below