I installed python virtualenv and virtualenvwrapper on ubuntu 15.10 following the answer at How to set up and use a virtual python environment in Ubuntu?. The installation was successful, i.e. I can create, deactivate and work on my python virtualenvs. However since I installed it, every time I fire up the terminal I get:
bash: WORKON_HOME=~/.virtualenvs: No such file or directory
I checked if the environment variable WORKON_HOME is set correctly by typing:
echo $WORKON_HOME
and I get as output:
~/.virtualenvs
What can I do to remove the error? Thank you
EDIT 1
The output of grep WORKON_HOME ~/.bashrc
command is:
echo "export WORKON_HOME=$WORKON_HOME" >> ~/.bashrc
echo "export PIP_VIRTUALENV_BASE=$WORKON_HOME" >> ~/.bashrc
source WORKON_HOME=/home/diego/.virtualenvs
export WORKON_HOME=/home/diego/.virtualenvs
export WORKON_HOME=
export WORKON_HOME=
export WORKON_HOME=
export WORKON_HOME=
export WORKON_HOME=
EDIT 2
I have removed the lines you (@ByteCommander) mentioned. The error does not appear anymore. However, when I edit the .bashrc file, at the end it look like this:
source /usr/local/bin/virtualenvwrapper.sh
export PIP_VIRTUALENV_BASE=/home/diego/.virtualenvs
export WORKON_HOME=/home/diego/.virtualenvs
source /usr/local/bin/virtualenvwrapper.sh
export PIP_VIRTUALENV_BASE=/home/diego/.virtualenvs
source /usr/local/bin/virtualenvwrapper.sh
export PIP_VIRTUALENV_BASE=
source /usr/local/bin/virtualenvwrapper.sh
export PIP_VIRTUALENV_BASE=
source /usr/local/bin/virtualenvwrapper.sh
export PIP_VIRTUALENV_BASE=
source /usr/local/bin/virtualenvwrapper.sh
export PIP_VIRTUALENV_BASE=
source /usr/local/bin/virtualenvwrapper.sh
export PIP_VIRTUALENV_BASE=
export WORKON_HOME=/home/diego/.virtualenvs
source /usr/local/bin/virtualenvwrapper.sh
export PIP_VIRTUALENV_BASE=/home/diego/.virtualenvs
There are many lines that repeat. Is this normal? Shall I remove the duplicate? Thanks
grep WORKON_HOME ~/.bashrc
. – Byte Commander Mar 15 '16 at 12:53