The color of your terminal is defined by some environment variables like PS1
, but each time you start a new bash shell (like when your run sudo -s
), the new shell enviroment is initialized by running the .bashrc of the current user (here the user is root whose .bashrc is at /root/.bashrc, and by default root's .bashrc doesn't define colors).
In the same idea virtualenv activation script replace the PS1
enviroment variables in order to add the enviroment name in the prompt and thus may remove the colors at the same time.
Here you seem to restore colors by running your own user .bashrc manually, but if you want a more permanent solution, you need to edit root .bashrc as well as your virtual env activation script to set the PS1 value you want.
This is for the color problem. As for your other errors, the virtualenv binary doesn't seam to be installed correctly, so maybe try reinstalling it.
sudo -s
while you already have a shell as root userworkon wrk
script do exactly?virtualenvwrapper
and could no longer make virtualenvs without entering thesudo -s
. Andworkon
is a tool ofvirtualenvwrapper
that helps me activate the virtualenv.