automatically activate python virtualenv in pycharm

I slightly modified an answer from stackoverflow to make it work on linux

nano ~/.pycharmrc
if [ -r ".pycharm/term-activate" ]; then
   source ~/.bash_profile
   source ".pycharm/term-activate"
   source $PYCHARM_VENV/bin/activate
fi

On your project folder, assuming you have a virtual environment called venv35,

mkdir .pycharm
nano .pycharm/term-activate

With the content ...

more...