Issues

Issue #51 resolved

unset GREP_OPTIONS before using grep

Manuel Kaufmann
created an issue

Hello, I'm using virtualevnwrapper from the bitbucket repo and I'm getting this error when I try to create a new virtualenv

[humitos] [~]$ mkvirtualenv testing

ERROR: Found virtualenv in path as "1:/usr/bin/virtualenv" but that does not exist

[humitos] [~]$

Comments (13)

  1. Manuel Kaufmann reporter
    [humitos] [~]$ mkvirtualenv
    ERROR: Found virtualenv in path as "1:/usr/bin/virtualenv" but that does not exist
    [humitos] [~]$ which which
    /usr/bin/which
    [humitos] [~]$ which virtualenv
    /usr/bin/virtualenv
    [humitos] [~]$ ls -lh /usr/bin/which
    lrwxrwxrwx 1 root root 10 dic  3  2009 /usr/bin/which -> /bin/which
    [humitos] [~]$ ls -lh /usr/bin/virtualenv
    -rwxr-xr-x 1 root root 316 mar 17 13:58 /usr/bin/virtualenv
    [humitos] [~]$ ls -lh /bin/which
    -rwxr-xr-x 1 root root 946 nov 14  2009 /bin/which
    [humitos] [~]$
    
  2. Manuel Kaufmann reporter

    Here is the output:

    [humitos] [~]$ set -x
    ++ echo -ne '\033]0;humitos@michifus: ~\007'
    [humitos] [~]$ mkvirtualenv mynewenv
    + mkvirtualenv mynewenv
    + eval 'envname=$1'
    ++ envname=mynewenv
    + virtualenvwrapper_verify_workon_home
    + '[' '!' -d /home/humitos/.virtualenvs ']'
    + return 0
    + virtualenvwrapper_verify_virtualenv
    ++ grep -v 'not found'
    ++ which virtualenv
    + typeset venv=1:/usr/bin/virtualenv
    + '[' 1:/usr/bin/virtualenv = '' ']'
    + '[' '!' -e 1:/usr/bin/virtualenv ']'
    + echo 'ERROR: Found virtualenv in path as "1:/usr/bin/virtualenv" but that does not exist'
    ERROR: Found virtualenv in path as "1:/usr/bin/virtualenv" but that does not exist
    + return 1
    + return 1
    ++ echo -ne '\033]0;humitos@michifus: ~\007'
    [humitos] [~]$
    

    Thanks, see you.

  3. Manuel Kaufmann reporter

    I found the problem...

    I have this line in my ".bashrc":

    export GREP_OPTIONS='--color=auto --line-number'
    

    So, the output of "grep -v" is with the number of the line at the beginnig "1:"

  4. Manuel Kaufmann reporter

    Here an example:

    [humitos] [~]$ mkvirtualenv with_grep_options
    ERROR: Found virtualenv in path as "1:/usr/bin/virtualenv" but that does not exist
    [humitos] [~]$ unset GREP_OPTIONS
    [humitos] [~]$ mkvirtualenv without_grep_options
    New python executable in without_grep_options/bin/python
    Installing setuptools............done.
    (without_grep_options)[humitos] [~]$
    
  5. Log in to comment