econchick / new-coder

New Coder tutorials
zlib License
597 stars 392 forks source link

/etc/bash_completion.d/virtualenvwrapper: No such file or directory #221

Closed tamj0rd2 closed 4 years ago

tamj0rd2 commented 7 years ago

I'm currently trying to follow the linux setup steps here. I've followed all of the steps but when I run source ~/.bash_profile I get the error /etc/bash_completion.d/virtualenvwrapper: No such file or directory. Virtualenvwrapper is definitely installed:

$ pip list --format=columns
Package             Version 
------------------- --------
adium-theme-ubuntu  0.3.4   
ccsm                0.9.12.2
compizconfig-python 0.9.12.2
iotop               0.6     
netifaces           0.10.4  
pbr                 3.1.1   
pip                 9.0.1   
pygobject           3.20.0  
setuptools          20.7.0  
six                 1.10.0  
stevedore           1.24.0  
unity-lens-photos   1.0     
vboxapi             1.0     
virtualenv          15.1.0  
virtualenv-clone    0.2.6   
virtualenvwrapper   4.7.2   
wheel               0.29.0  
tamj0rd2 commented 7 years ago

Running these commands solved it. Not sure which one is actually responsible though

sudo pip uninstall virtualenvwrapper
sudo apt-get install virtualenvwrapper
sudo pip install virtualenvwrapper
merwok commented 7 years ago

That makes sense: it would be bad form for a package manager like pip to install things in /etc, which is owned by the system package manager (APT / dpkg). When you use pip install virtualenvwrapper, the config file ends up installed somewhere under your home directory; when you install with apt-get, the config file is installed under /etc.

tamj0rd2 commented 7 years ago

Thanks. Maybe the steps on the website need to be updated then, since they currently say to use pip.

image

I can do a PR for this a bit later

merwok commented 7 years ago

Yes, «sudo pip» leads to trouble and IMO should not be advertised.