0

For some reason, every time I type the virtualenvwrapper command WORKON in Pycharm I get a "command not found" error. This will recur until I type source ~/.bashrc for every new terminal session in Pycharm. Normal Terminal sessions behave as expected.

These are the contents of my ~/.bashrc file:

export WORKON_HOME=$HOME/.virtualenvs
source /usr/local/bin/virtualenvwrapper.sh

Is this the natural behavior, any way to not have to type this source command every time?

zerohedge
  • 3,185
  • 4
  • 28
  • 63
  • [this post](http://stackoverflow.com/questions/415403/whats-the-difference-between-bashrc-bash-profile-and-environment) will give you some of the differences between the different shells but one line in particular that might be important because youre using `pycharm` is this - **`bash` complicates this in that `.bashrc` is only read by a shell that's both interactive and non-login** – Craicerjack Dec 05 '16 at 14:29

1 Answers1

1

See this blog for a detailed explanation of the difference between .bashrc and .bash_profile.

TL;DR, add the following to your .bash_profile:

if [ -f ~/.bashrc ]; then
  source ~/.bashrc
fi
Henry Heath
  • 1,072
  • 11
  • 19