Firstly, setup your python conda env / venv in Pycharm Project Settings. And add configuration as shown in below image:
Add config in Pycharm
This works for me.