Wrong pip in conda env
Question: I have a conda env called birdid.

While working in the env (i.e. I did `source activate bird_dev`), showing the
list of the packages give

    
    
    (bird_dev)...$ conda list
    # packages in environment at /home/jul/Development/miniconda/envs/bird_dev:
    #
    ...
    pep8                      1.6.2                    py27_0  
    pip                       7.1.2                    py27_0  
    pixman                    0.26.2                        0  
    ...
    

but when trying to see what `pip` is used I get

    
    
    (bird_dev)...$ which pip
    /usr/local/bin/pip
    

while the correct `python` is found

    
    
    (bird_dev)...$ which python
    /home/jul/Development/miniconda/envs/bird_dev/bin/python
    

Anybody can help?

**Edit: more details about the installed versions**

Check which -a pip

    
    
    (bird_dev)...$ which -a pip
    /usr/local/bin/pip
    /usr/bin/pip
    

The version in `/usr/bin/pip` is quite old.

    
    
    (bird_dev)...$ /usr/bin/pip -V
    pip 1.5.4 from /usr/lib/python2.7/dist-packages (python 2.7)    
    (bird_dev)....$ /usr/local/bin/pip -V
    pip 6.1.1 from /usr/local/lib/python2.7/dist-packages (python 2.7)
    

There is actually no pip in the env

    
    
    $ ll /home/jul/Development/miniconda/envs/bird_dev/bin/ | grep pip
    

returns nothing

there is one pip in `/home/jul/Development/miniconda/bin/pip`

    
    
    $ /home/jul/Development/miniconda/bin/pip -V
    pip 6.1.1 from /usr/local/lib/python2.7/dist-packages (python 2.7)
    

but it is not the version listed by `conda list`, and it is a python script
(!)

    
    
    $ cat /home/jul/Development/miniconda/bin/pip
    #!/home/jul/Development/miniconda/bin/python
    if __name__ == '__main__':
        import sys
        from pip import main
    
        sys.exit(main())
    

**Edit: echo $PATH**

    
    
    (bird_dev)...$ echo $PATH
    /home/jul/Development/miniconda/envs/bird_dev/bin:/home/jul/torch/install/bin:/home/jul/torch/install/bin:/home/jul/torch/install/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games
    

**Edit: try to force install**

    
    
    (bird_dev)...$ conda install --force pip
    Fetching package metadata: ....
    Solving package specifications: .
    Package plan for installation in environment /home/jul/Development/miniconda/envs/bird_dev:
    
    The following packages will be UPDATED:
    
        pip: 7.1.2-py27_0 --> 7.1.2-py27_0
    
    Proceed ([y]/n)? y
    
    [      COMPLETE      ]|##################################################################################################################################################################################| 100%
    Extracting packages ...
    [      COMPLETE      ]|##################################################################################################################################################################################| 100%
    Unlinking packages ...
    [      COMPLETE      ]|##################################################################################################################################################################################| 100%
    Linking packages ...
    [      COMPLETE      ]|##################################################################################################################################################################################| 100%
    (bird_dev)...$ which pip
    /home/jul/Development/miniconda/envs/bird_dev/bin/pip
    (bird_dev)...$ /home/jul/Development/miniconda/envs/bird_dev/bin/pip -V
    pip 6.1.1 from /usr/local/lib/python2.7/dist-packages (python 2.7)
    (bird_dev)...$ cat /home/jul/Development/miniconda/envs/bird_dev/bin/pip 
    #!/home/jul/Development/miniconda/envs/bird_dev/bin/python
    if __name__ == '__main__':
        import sys
        from pip import main
    
        sys.exit(main())
    

Weird.


Answer: You probably have `PYTHONPATH` set. I would recommend unsetting it, and
removing any lines from `~/.bashrc` that set it. It will cause any of your
conda environments' Pythons to look in that location before themselves.

