Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I don't know what's more embarrassing: that I don't know how to go about finding the answer to this question myself, or that it has to be asked at all in the first place, but...

where does apt-get put the virtualenvwrapper.sh script after it installs virtualenvwrapper?

I'm at wits' end...

% sudo apt-get install virtualenvwrapper
...
% rehash
% which virtualenvwrapper.sh
virtualenvwrapper.sh not found
% which virtualenvwrapper
virtualenvwrapper not found
% find / -path /media -prune -o -name virtualenvwrapper.sh
/media
% dpkg-query -L virtualenvwrapper | grep 'virtualenvwrapper\.sh'
% sudo apt-get install virtualenvwrapper
Reading package lists...
Building dependency tree...
Reading state information...
virtualenvwrapper is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

I've run out of things to try: apt-get says virtualenvwrapper is already installed, but I can't find any sign of virtualenvwrapper.sh anywhere.

UPDATE: Well, I just discovered that the file

/etc/bash_completion.d/virtualenvwrapper

...looks very much like virtualenvwrapper.sh. I can't tell whether this file was put there by apt-get when I ran apt-get install virtualenvwrapper (the file's mdate is several months ago), but if it was, then I'm mystified by the apparent stupidity of the arrangement... For one thing, not everyone uses bash (I happen to use zsh). For another, one may want to run virtualenvwrapper.sh at times other than startup... I'm sure I'm missing something major here, but on the surface, it sure looks like the apt-get installation of virtualenvwrapper is plain retarded... At any rate, it wasted about three hours of my time...

share|improve this question
2  
Another zsh-user here... might as well stop using the official package for virtualenvwrapper, fewer surprises that way! –  kaleissin Aug 11 '13 at 10:07
    
You can source /etc/bash_completion.d/virtualenvwrapper in zsh as well. It works fine as-is. –  Jim Stewart Nov 17 '13 at 4:15
    
@JimStewart I can do lots of things. Point of a package is that I don't have to. –  Melvyn Jul 6 at 19:00

1 Answer 1

up vote 19 down vote accepted

From /usr/share/doc/virtualenvwrapper/README.Debian:

In contrast to the information in
/usr/share/doc/virtualenvwrapper/en/html/index.html this package installs
virtualenvwrapper.sh as /etc/bash_completion.d/virtualenvwrapper.

Virtualenvwrapper is enabled if you install the package bash-completion and
enable bash completion support in /etc/bash.bashrc or your ~/.bashrc.

If you only want to use virtualenvwrapper you may just add

 source /etc/bash_completion.d/virtualenvwrapper

to your ~/.bashrc.

Yes, it's a bit hard to find :D

share|improve this answer
1  
What about zsh users? Great, another package that behaves differently on each OS. I think a sudo apt-get purge virtualenvwrapper and sudo pip install virtualenvwrapper is in order. –  kermit666 Nov 8 '13 at 12:54
    
You can source /etc/bash_completion.d/virtualenvwrapper in zsh as well. It works fine as-is. –  Jim Stewart Nov 17 '13 at 4:14

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.