-   Programming (
-   -   How to display the name of the current Virtualenv? (

elieobeid7 08-18-2013 07:45 PM

How to display the name of the current Virtualenv?
I'm using virtualenv, virtualenvwrapper, zsh, oh-my-zsh, terminator, on Crunchbang.

I'm trying to display the name of the current virtualenv like so

workon example

I've tried many solutions none seems to work, here's my .zshrc file, I know it's no big deal to fix it but I can't find the right solution. It has been a long time since the last time I used Linux for Django development, I forgot what I used to do.

Right now, I see username@crunchbang, I can't tell which virtualenv I'm using.

here's my activate file

I used set -x, this is the output of source activate and this is the output of workon test-env

dugan 08-19-2013 01:00 PM


plugins=(git colorize debian django virtualenv virtualenvwapper)
In my experience, it doesn't work if you activate both the virtualenv and virtualenvwrapper plugins. Try removing one of the two.

elieobeid7 08-19-2013 01:02 PM

i have oh-my-zsh installed

dugan 08-19-2013 01:19 PM

I know. I've edited my reply.

elieobeid7 08-19-2013 01:24 PM

removed all the plugin, didn't fix it, may i see your .zshrc file? it may be a configuration error

dugan 08-19-2013 01:49 PM


Originally Posted by elieobeid7 (Post 5012016)
removed all the plugin, didn't fix it

I assume you mean "I tried removing one, then I tried putting it back and removing the other one".

Here's by .zshrc (comments removed for brevity):


plugins=(django git python virtualenvwrapper)
source $ZSH/
export PATH=$PATH:/usr/local/bin:/usr/bin:/bin:/usr/games:/usr/lib64/java/bin:/usr/lib64/java/jre/bin:/usr/lib64/kde4/libexec:/usr/lib64/qt/bin:/usr/share/texmf/bin:.
export TERM=xterm-256color

elieobeid7 08-19-2013 02:49 PM

how is virtualenv working for you, don't you have to add


export WORKON_HOME=~/.virtualenvs
source /usr/local/bin/

or is that done within oh-my-zsh virtualenvwrapper plugin?

dugan 08-19-2013 03:08 PM

I only have this:


. /usr/bin/
It's probably sourced somewhere else (e.g. in profile.d)

elieobeid7 08-19-2013 03:38 PM

and does

workon somevirtualenv

work for you?

dugan 08-19-2013 03:45 PM

Of course.

elieobeid7 08-19-2013 04:44 PM

worked, im speechless but i cant change the themes, well i don't really care about themes, at the very least i got it working and i know that it may have to do with the themes

All times are GMT -5. The time now is 12:32 PM.