In arch linux, after installing virtualenvwrapper on a system scale, through sudo pip2 install virtualenvwrapperand adding this to my custom .bash_profile,
export WORKON_HOME=/home/myuser/.virtualenvs
export PROJECT_HOME=/home/myuser/work
source /usr/bin/virtualenvwrapper.sh
Error every time you start a new shell window: -
which: no python in (/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin:/usr/bin/core_perl)
-bash: : command not found
virtualenvwrapper.sh: There was a problem running the initialization hooks. If Python could not import the module virtualenvwrapper.hook_loader, check that virtualenv has been installed for VIRTUALENVWRAPPER_PYTHON= and that PATH is set properly.
This can be traced back to line 50 in the virtualenvwrapper.sh script file: -
47
48 if [ "$VIRTUALENVWRAPPER_PYTHON" = "" ]
49 then
50 VIRTUALENVWRAPPER_PYTHON="$(\which python)"
51 fi
And this is the result of a conflict with the agreement with linux linux to use python2 to install python 2.7.
If I change line 50 to which python2everything works fine, and I will not see an error message whenever I start a new shell.
? , - linux if-else python2 virtualenvwrapper.sh virtualvvrapper? -, linux?