6

I'm trying to install geopandas and I would normally do it through pip, but it seems to struggle with dependencies so I went to try installing via conda package manager.

It all goes well until I get this error:

Conda error: Cannot link a source that does not exist C:\ProgramData\Anaconda3\Scripts\conda.exe

I checked and I have conda.exe in the folder specified. I also have it in PATH variable.

I also had a look at other questions on this error and tried proposed solutions:

conda clean --all --yes
conda update conda
conda update anaconda

And yet I still get the same error every time. Anyone knows any other ways to resolve this problem?

Thanks!

EDIT:

I have tried installing geopandas using these two options:

conda install geopandas
conda install --channel conda-forge geopandas

Output of conda info:

(C:\ProgramData\Anaconda3) C:\VULCAN_HOME>conda info
Current conda install:

               platform : win-64
          conda version : 4.3.30
       conda is private : False
      conda-env version : 4.3.30
    conda-build version : 3.0.27
         python version : 3.6.3.final.0
       requests version : 2.22.0
       root environment : C:\ProgramData\Anaconda3  (writable)
    default environment : C:\ProgramData\Anaconda3
       envs directories : C:\ProgramData\Anaconda3\envs
                          C:\Users\cherp2\AppData\Local\conda\conda\envs
                          C:\VULCAN_HOME\.conda\envs
          package cache : C:\ProgramData\Anaconda3\pkgs
                          C:\Users\cherp2\AppData\Local\conda\conda\pkgs
           channel URLs : https://repo.continuum.io/pkgs/main/win-64
                          https://repo.continuum.io/pkgs/main/noarch
                          https://repo.continuum.io/pkgs/free/win-64
                          https://repo.continuum.io/pkgs/free/noarch
                          https://repo.continuum.io/pkgs/r/win-64
                          https://repo.continuum.io/pkgs/r/noarch
                          https://repo.continuum.io/pkgs/pro/win-64
                          https://repo.continuum.io/pkgs/pro/noarch
                          https://repo.continuum.io/pkgs/msys2/win-64
                          https://repo.continuum.io/pkgs/msys2/noarch
            config file : None
             netrc file : None
           offline mode : False
             user-agent : conda/4.3.30 requests/2.22.0 CPython/3.6.3 Windows/7 W
indows/6.1.7601
          administrator : False

Full error message:

ERROR conda.core.link:_execute_actions(337): An error occurred while installing package 'defaults::tqdm-4.42.1-py_0'.
CondaError: Cannot link a source that does not exist. C:\ProgramData\Anaconda3\Scripts\conda.exe
Running `conda clean --packages` may resolve your problem.
Attempting to roll back.
NotAName
  • 3,821
  • 2
  • 29
  • 44
  • You will need to give a bit more info. For example the output of `conda info`, and the ful install command that gives that error with the full output, would help. – joris Jun 06 '20 at 06:28
  • @joris I've added the requested information into the post. Thanks for the help! – NotAName Jun 06 '20 at 08:16
  • Your conda version is really, really old (fall 2017). I'd try updating it to the latest version via `conda update conda` – cel Jun 06 '20 at 11:01
  • If you want to use `geopandas` via conda-forge, I recommend creating a fresh channel and installing *everything* in the that channel from conda-forge. `conda create --name=gis python=3.7 geopandas --strict-channel-priority` – Paul H Jun 06 '20 at 15:02
  • @cel, I tried that but it leads to the very same error. And every time it fails on this particular package `tqdm-4.42.1-py_0`. – NotAName Jun 06 '20 at 23:10
  • Tried to circumvent the error by installing the troublesome package through pip. It worked, but now conda still fails but quotes another package `tqdm-4.46.0`. I tried also installing it manually through pip and it worked, but conda still fails. – NotAName Jun 06 '20 at 23:19
  • Does `conda install tqdm` help? (see https://stackoverflow.com/questions/46872014/conda-forgetqdm-4-19-4-py-0-condaerror-cannot-link-a-source-that-does-not-e) – joris Jun 07 '20 at 07:15
  • And since you have such an old conda version, it might also be an option to reinstall the full of Anaconda with a recent version – joris Jun 07 '20 at 07:18
  • @joris, would that I could. I'm on a company laptop and I can only have approved software, but for whatever reason we have an ancient Anaconda in the approved list and no updates in sight. – NotAName Jun 07 '20 at 07:57
  • This error might be related to starting the anaconda promt with admin privileges instead of without. – tfv May 19 '21 at 12:15

1 Answers1

6

Seems to work after:

conda install tqdm -f

conda update conda worked after that, if executed with admin privileges.

tfv
  • 6,016
  • 4
  • 36
  • 67