Sample Header Ad - 728x90

Python virtualenvwrapper and ZSH prompt

2 votes
1 answer
1816 views
I am using archlinux with zsh and python simha@gauranga ~ % echo $SHELL /usr/bin/zsh simha@gauranga ~ % python3 --version Python 3.5.1 my .zshrc is export WORKON_HOME=~/.virtualenvs source /usr/bin/virtualenvwrapper.sh Once i open a new terminal I could create a new virtualenv in the following way. (simha is the home folder name and gauranga is the computer name) simha@gauranga ~ % mkvirtualenv new2 Using base prefix '/usr' New python executable in /home/simha/.virtualenvs/new3/bin/python3 Also creating executable in /home/simha/.virtualenvs/new3/bin/python Installing setuptools, pip, wheel...done. virtualenvwrapper.user_scripts creating /home/simha/.virtualenvs/new3/bin/predeactivate virtualenvwrapper.user_scripts creating /home/simha/.virtualenvs/new3/bin/postdeactivate virtualenvwrapper.user_scripts creating /home/simha/.virtualenvs/new3/bin/preactivate virtualenvwrapper.user_scripts creating /home/simha/.virtualenvs/new3/bin/postactivate virtualenvwrapper.user_scripts creating /home/simha/.virtualenvs/new3/bin/get_env_details Now i am entering the virtualenv simha@gauranga ~ % workon new3 simha@gauranga ~ % if we see above there is no change in the prompt to shown which env in am in. I have followed the http://virtualenvwrapper.readthedocs.io/en/latest/tips.html for zsh prompt still its not working the following are the postactivate and postdeactivate files simha@gauranga ~ % tail -f .virtualenvs/postactivate .virtualenvs/postdeactivate ==> .virtualenvs/postactivate .virtualenvs/postdeactivate <== RPROMPT="$_OLD_RPROMPT"
Asked by Santhosh (409 rep)
Sep 1, 2016, 11:27 AM
Last activity: Nov 10, 2023, 12:08 PM