Usr/local/bin/virtualenvwrapper.sh No Such File Or Directory

6/5/2019
21 Comments

As I'm starting to learn Python programming, I installed virtualenvwrapper via these commands:

I've been getting this error every time I open a terminal (via guake)

I'm using Linux Mint 10 64bit GNOME.

Is there any way to solve this error I see in the terminal?

I've tried searching via google but none of them seems to fix this problem.

Thank you in advance.

Edit

This is what is written in /home/user/.bashrc

Please help :(

kohrime
kohrimekohrime

7 Answers

According to this, it seems to be an error with the APT package on Debian/Ubuntu/Mint.

I have installed virtualenvwrapper through APT first, then removed it and installed it via pip.

The APT package has added the file /etc/bash_completion.d/virtualenvwrapper but didn't remove it. This is the file that's causing problems.

The recommended solution is to remove this file and the errors stop appearing. (Weirdly, simply renaming the file was not enough).

rahmurahmu

For those who come afterwards, I had the same problem on Ubuntu 12 and solved this way:

  1. Switch to correct user:

  2. Make sure your WORKON_HOME variable is set to the path you want it to be (defaults to ~/.virtualenv)

  3. Then add these two lines before your source command:

  4. Then save and re-source your bashrc:

x - yx - y

I had similar issues. I removed any settings in my ~/.bashrc related to virtualenv, eg:

That fixed the errors.

MartlarkMartlark

For complete removal under debian remove following:

That worked for me

Also delete files from python's dist-packages (depends on distro and python version)

Lu.nemecLu.nemec

You need to set the VIRTUALENVWRAPPER_LOG_DIR environment variable. Add this to your .bashrc file:

John KeyesJohn Keyes

I've had a similar problem while trying to make it work on Debian. I needed to run it as a user other than the X user, but it used the ~/.virtualenvs directory of the X user for WORKON_HOME, VIRTUALENVWRAPPER_LOG_DIR and VIRTUALENVWRAPPER_HOOK_DIR.

It works now that I set those variables to a proper directory in ~/.bashrc.

AleksejAleksej

Try and use the export command like this:

In my case, the hook.log was created in the same path that my virtualenvwrapper config where in /home/my_user/.virtualenvs, so what I did was to export the variable like this

Andy
user2971029user2971029

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

I've tried everything I can but now I need help! I've hit the limit of what I do understand.

My error:

My take is that virtualenv doesn't know where python is. Is this the case? How can I fix this?

System is Mac OSX 10.9.4

I have used brew to install python 2.7.8.1. - Python 2.7*something* was on there but I removed it. I can't remember exactly what I did to do that however. Sorry. I am new to macs. - This new python instance sits here: /usr/local/Cellar/python/2.7.8_1/ - The /usr/local/bin/python file when I readlink /usr/local/bin/python it points to the above

.bash_profile:

Paths:

Python seems to work but path looks busy

Any help appreciated!

Thanks,

Andy

This is going badly..... Help! Not least because I have messed up the links, I think there is a problem with these links

I thought I had it. I changed the links as follows. But it's still screwed.

I'd better stop now before I do any more damage.

I changed /usr/bin/python to point to /usr/local/Cellar/python/2.7.8_1/bin python2.7:

No the error has evolved to the below:

pythonpython-2.7osx-mavericksvirtualenvvirtualenvwrapper
Andrew Taylor
Andrew TaylorAndrew Taylor

1 Answer

Resolved as follows:

  1. System restore by downloading and re-installing Maverics (using the automated apple startup tool)
  2. Following the advice here: Can't pip install virtualenv in OS X 10.8 with brewed python 2.7 and here:http://www.lowindata.com/2013/installing-scientific-python-on-mac-os-x/
  3. My virtualenv was in a different location to that specified in page (2), so bash_profile should containsource /usr/local/bin/virtualenvwrapper.shinstead of:source /usr/local/share/python/virtualenvwrapper.sh
Community
Andrew TaylorAndrew Taylor

Not the answer you're looking for? Browse other questions tagged pythonpython-2.7osx-mavericksvirtualenvvirtualenvwrapper or ask your own question.