This is the current state of my .bashrc file:
# Load up standard site-wide settings.
source /etc/bashrc
#remove duplicate entries from history
export HISTCONTROL=ignoreboth
# Show current git branch in prompt.
function parse_git_branch {
git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1)/'
}
RED="\[\033[0;31m\]"
YELLOW="\[\033[0;33m\]"
GREEN="\[\033[0;32m\]"
LIGHT_GREEN="\[\033[1;32m\]"
LIGHT_GRAY="\[\033[0;37m\]"
PS1="$LIGHT_GRAY\$(date +%H:%M) \w$YELLOW \$(parse_git_branch)$LIGHT_GREEN\$ $LIGHT_GRAY"
# Load virtualenvwrapper
source virtualenvwrapper.sh &> /dev/null
export WORKON_HOME=~/.virtualenvs
source /usr/local/bin/virtualenvwrapper.sh
Adding the lines you suggested still did not resolve the issue. This is full error I'm getting:
/bin/sh: 1: workon: not found
Traceback (most recent call last):
File "test.py", line 3, in <module>
subprocess.check_call("workon myvirtualenv", shell=True)
File "/usr/lib/python3.8/subprocess.py", line 364, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command 'workon myvirtualenv' returned non-zero exit status 127.