bash shell error: "no such file or directory"
I am trying to install Virtualenv wrapper on Ubuntu 14.04. But whenever I start a terminal, I get the error saying bash:
/usr/share/virtualenvwrapper/virtualenvwrapper_lazy.sh: No such file or directory.
I also checked the bashrc script by using gedit ~/.bashrc
, but there is no such line like that. Does anyone know where I am wrong?
I just had the same problem on Linux Mint.
The following file was causing the issue: /etc/bash_completion.d/virtualenvwrapper
I made a backup (just in case) and deleted it, and everything seems to be working fine now.
In my case, I had previously installed virtualenvwrapper using apt-get install virtualenvwrapper
and later uninstalled it using apt-get remove virtualenvwrapper
, which left the 'configuration' file /etc/bash_completion.d/virtualenvwrapper
behind. This bash completion definition was sourced by bash (it had nothing to do with my .bashrc) and caused the error message.
The solution was to run:
sudo apt-get purge virtualenvwrapper
Which purged all files related to virtualenvwrapper. The reason I uninstalled it was to use pip's version instead (more up-to-date), which can be installed globally using:
sudo pip install virtualenvwrapper
Following these instructions, I found that the error occurred when sourcing the virtualenvwrapper bash script, i.e.:
source /usr/local/bin/virtualenvwrapper.sh
The script references the file /etc/bash_completion.d/virtualenvwrapper
as pointed out by arcticfeather.
Open up the script using the following command:
sudo nano /etc/bash_completion.d/virtualenvwrapper
This is where the non-existent file is being referenced. Simply replace /usr/share/virtualenvwrapper/virtualenvwrapper_lazy.sh
with /usr/local/bin/virtualenvwrapper_lazy.sh
and you should be good to go!