Repository: conda/conda

Issue:
CondaError resulting from incorrect path
I ran `conda update --all` and got:

```
jessime@jessime-Q502LA:~$ conda update --all
Fetching package metadata .........
Solving package specifications: .

Package plan for installation in environment /home/jessime/anaconda2:

The following NEW packages will be INSTALLED:

    bleach:          1.5.0-py27_0                  
    html5lib:        0.999-py27_0                  
    olefile:         0.44-py27_0                   
    pandocfilters:   1.4.1-py27_0                  
    testpath:        0.3-py27_0                    

The following packages will be UPDATED:

    alabaster:       0.7.9-py27_0                   --> 0.7.10-py27_0     
    anaconda-client: 1.6.1-py27_0                   --> 1.6.2-py27_0      
    astropy:         1.3-np111py27_0                --> 1.3-np112py27_0   
    biopython:       1.68-np111py27_0               --> 1.68-np112py27_0  
    bottleneck:      1.2.0-np111py27_0              --> 1.2.0-np112py27_0 
    conda-build:     2.1.3-py27_0                   --> 2.1.5-py27_0      
    dask:            0.13.0-py27_0                  --> 0.14.0-py27_0     
    entrypoints:     0.2.2-py27_0                   --> 0.2.2-py27_1      
    fontconfig:      2.12.1-2                       --> 2.12.1-3          
    greenlet:        0.4.11-py27_0                  --> 0.4.12-py27_0     
    h5py:            2.6.0-np111py27_2              --> 2.6.0-np112py27_2 
    ipython:         5.1.0-py27_0                   --> 5.3.0-py27_0      
    jinja2:          2.9.4-py27_0                   --> 2.9.5-py27_0      
    jupyter_client:  4.4.0-py27_0                   --> 5.0.0-py27_0      
    jupyter_console: 5.0.0-py27_0                   --> 5.1.0-py27_0      
    jupyter_core:    4.2.1-py27_0                   --> 4.3.0-py27_0      
    llvmlite:        0.15.0-py27_0                  --> 0.16.0-py27_0     
    lxml:            3.7.2-py27_0                   --> 3.7.3-py27_0      
    matplotlib:      2.0.0-np111py27_0              --> 2.0.0-np112py27_0 
    nbconvert:       4.2.0-py27_0                   --> 5.1.1-py27_0      
    nbformat:        4.2.0-py27_0                   --> 4.3.0-py27_0      
    numba:           0.30.1-np111py27_0             --> 0.31.0-np112py27_0
    numexpr:         2.6.1-np111py27_2              --> 2.6.2-np112py27_0 
    numpy:           1.11.3-py27_0                  --> 1.12.0-py27_0     
    openssl:         1.0.2k-0                       --> 1.0.2k-1          
    pandas:          0.19.2-np111py27_1             --> 0.19.2-np112py27_1
    path.py:         10.0-py27_0                    --> 10.1-py27_0       
    pillow:          4.0.0-py27_0                   --> 4.0.0-py27_1      
    psutil:          5.1.2-py27_0                   --> 5.1.3-py27_0      
    pygments:        2.1.3-py27_0                   --> 2.2.0-py27_0      
    pytables:        3.3.0-np111py27_0              --> 3.3.0-np112py27_0 
    qtawesome:       0.4.3-py27_0                   --> 0.4.4-py27_0      
    requests:        2.12.4-py27_0                  --> 2.13.0-py27_0     
    scandir:         1.4-py27_0                     --> 1.5-py27_0        
    scikit-image:    0.12.3-np111py27_1             --> 0.12.3-np112py27_1
    scikit-learn:    0.18.1-np111py27_1             --> 0.18.1-np112py27_1
    scipy:           0.18.1-np111py27_1             --> 0.18.1-np112py27_1
    spyder:          3.1.2-py27_0                   --> 3.1.3-py27_0      
    sqlalchemy:      1.1.5-py27_0                   --> 1.1.6-py27_0      
    statsmodels:     0.6.1-np111py27_1              --> 0.8.0-np112py27_0 
    tqdm:            4.8.4-py27_0       conda-forge --> 4.11.2-py27_0     
    traitlets:       4.3.1-py27_0                   --> 4.3.2-py27_0      

Proceed ([y]/n)? y

openssl-1.0.2k 100% |#####################################################| Time: 0:00:00   5.70 MB/s
alabaster-0.7. 100% |#####################################################| Time: 0:00:00  24.07 MB/s
greenlet-0.4.1 100% |#####################################################| Time: 0:00:00  15.63 MB/s
olefile-0.44-p 100% |#####################################################| Time: 0:00:00  14.73 MB/s
pandocfilters- 100% |#####################################################| Time: 0:00:00  15.13 MB/s
path.py-10.1-p 100% |#####################################################| Time: 0:00:00  16.08 MB/s
psutil-5.1.3-p 100% |#####################################################| Time: 0:00:00  12.26 MB/s
pygments-2.2.0 100% |#####################################################| Time: 0:00:00   5.22 MB/s
requests-2.13. 100% |#####################################################| Time: 0:00:00   4.69 MB/s
scandir-1.5-py 100% |#####################################################| Time: 0:00:00   8.98 MB/s
sqlalchemy-1.1 100% |#####################################################| Time: 0:00:00   4.51 MB/s
tqdm-4.11.2-py 100% |#####################################################| Time: 0:00:00   2.76 MB/s
astropy-1.3-np 100% |#####################################################| Time: 0:00:02   4.37 MB/s
biopython-1.68 100% |#####################################################| Time: 0:00:00   3.22 MB/s
bottleneck-1.2 100% |#####################################################| Time: 0:00:00   3.85 MB/s
fontconfig-2.1 100% |#####################################################| Time: 0:00:00   4.01 MB/s
h5py-2.6.0-np1 100% |#####################################################| Time: 0:00:00   3.81 MB/s
html5lib-0.999 100% |#####################################################| Time: 0:00:00   4.58 MB/s
llvmlite-0.16. 100% |#####################################################| Time: 0:00:01   4.47 MB/s
lxml-3.7.3-py2 100% |#####################################################| Time: 0:00:00   5.22 MB/s
numexpr-2.6.2- 100% |#####################################################| Time: 0:00:00   6.08 MB/s
pillow-4.0.0-p 100% |#####################################################| Time: 0:00:00   5.65 MB/s
qtawesome-0.4. 100% |#####################################################| Time: 0:00:00   6.72 MB/s
scipy-0.18.1-n 100% |#####################################################| Time: 0:00:04   6.62 MB/s
traitlets-4.3. 100% |#####################################################| Time: 0:00:00  10.95 MB/s
anaconda-clien 100% |#####################################################| Time: 0:00:00  10.60 MB/s
bleach-1.5.0-p 100% |#####################################################| Time: 0:00:00  27.33 MB/s
entrypoints-0. 100% |#####################################################| Time: 0:00:00  15.58 MB/s
jupyter_core-4 100% |#####################################################| Time: 0:00:00  10.89 MB/s
numba-0.31.0-n 100% |#####################################################| Time: 0:00:00   8.07 MB/s
pytables-3.3.0 100% |#####################################################| Time: 0:00:00   7.82 MB/s
scikit-learn-0 100% |#####################################################| Time: 0:00:01   8.76 MB/s
testpath-0.3-p 100% |#####################################################| Time: 0:00:00  15.62 MB/s
ipython-5.3.0- 100% |#####################################################| Time: 0:00:00  10.36 MB/s
jupyter_client 100% |#####################################################| Time: 0:00:00  18.74 MB/s
nbformat-4.3.0 100% |#####################################################| Time: 0:00:00  11.99 MB/s
statsmodels-0. 100% |#####################################################| Time: 0:00:00  10.61 MB/s
dask-0.14.0-py 100% |#####################################################| Time: 0:00:00  12.87 MB/s
nbconvert-5.1. 100% |#####################################################| Time: 0:00:00  14.44 MB/s
conda-build-2. 100% |#####################################################| Time: 0:00:00  14.75 MB/s
jupyter_consol 100% |#####################################################| Time: 0:00:00  22.82 MB/s
matplotlib-2.0 100% |#####################################################| Time: 0:00:00  11.65 MB/s
scikit-image-0 100% |#####################################################| Time: 0:00:02  10.01 MB/s
spyder-3.1.3-p 100% |#####################################################| Time: 0:00:00  12.48 MB/s
cp: cannot stat '/home/jessime/anaconda2:/lib/libcrypto.so.1.0.0': No such file or directory
mv: cannot stat '/home/jessime/anaconda2/lib/libcrypto.so.1.0.0-tmp': No such file or directory
ERROR conda.core.link:_execute_actions(318): An error occurred while installing package 'defaults::pandas-0.19.2-np112py27_1'.
CondaError: Cannot link a source that does not exist. /home/jessime/anaconda2/pkgs/pandas-0.19.2-np112py27_1/lib/python2.7/site-packages/pandas/_version.py

Attempting to roll back.



CondaError: Cannot link a source that does not exist. /home/jessime/anaconda2/pkgs/pandas-0.19.2-np112py27_1/lib/python2.7/site-packages/pandas/_version.py

```

It looks like all of the downstream issues come from the line:

```
cp: cannot stat '/home/jessime/anaconda2:/lib/libcrypto.so.1.0.0': No such file or directory
```

Notice the ":" following "anaconda2". I can manually follow the correct path to `libcrypto.so.1.0.0` and verify that it exists. So basically, something is causing a colon to be inserted into the path name. 

I run `conda update --all` about once a month, including a month ago, and this is the first time this issue has come up.


Discussion:
Try `conda clean --packages`, and then try again.  Or just

    rm -rf /home/jessime/anaconda2/pkgs/pandas-0.19.2-np112py27_1

We've got some UI issues where conda looks to stall and users hit ctrl-c to break out, but conda is really just in the middle of doing real work.  Several fixes for this coming...
> We've got some UI issues where conda looks to stall and users hit ctrl-c to break out

Unless I was just totally not paying attention and hit the keys by accident, I'm fairly confident that I didn't `ctrl+c`. 

But `conda clean --packages` worked perfectly! Everything is updated and ready to go. Thanks for the quick response.
There could have been another failure too.  You might not have hit ctrl-c.  `conda clean --packages` is a easy fix, but it's definitely on our list to prevent this from happening in the first place.

Resolving patch:
diff --git a/conda/core/path_actions.py b/conda/core/path_actions.py
--- a/conda/core/path_actions.py
+++ b/conda/core/path_actions.py
@@ -811,6 +811,7 @@ def execute(self):
         target_package_cache[package_cache_entry.dist] = package_cache_entry
 
     def reverse(self):
+        rm_rf(self.target_full_path)
         if lexists(self.hold_path):
             log.trace("moving %s => %s", self.hold_path, self.target_full_path)
             rm_rf(self.target_full_path)


Test patch: