zerohedge
zerohedge

Reputation: 3765

Have to ~/.bashrc every time for virtualenvwrapper to work, why?

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?

Upvotes: 0

Views: 581

Answers (1)

Henry Heath
Henry Heath

Reputation: 1082

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

Upvotes: 1

Related Questions