Issue Installing Deeplabcut 2.1.0

I am currently trying to upgrade my deeplabcut to the newest version but I am running into a problem when installing 2.1.0 in my conda env. For reference, I am on a Windows 10 GPU system, python==3.6.8, tensorflow==1.14.0, and the conda envs which you have provided for dlc-windowsGPU. This is the error message I see when I try to run pip install deeplabcut==2.1.0:

Collecting Shapely (from imgaug->deeplabcut==2.1.0)
  Using cached https://files.pythonhosted.org/packages/a2/fb/7a7af9ef7a35d16fa23b127abee272cfc483ca89029b73e92e93cdf36e6b/Shapely-1.6.4.post2.tar.gz
    ERROR: Command errored out with exit status 1:
     command: 'C:\Users\SaundersLab\Anaconda3\envs\dlc-windowsGPU\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\SAUNDE~1\\AppData\\Local\\Temp\\pip-install-gtnmsat_\\Shapely\\setup.py'"'"'; __file__='"'"'C:\\Users\\SAUNDE~1\\AppData\\Local\\Temp\\pip-install-gtnmsat_\\Shapely\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base pip-egg-info
         cwd: C:\Users\SAUNDE~1\AppData\Local\Temp\pip-install-gtnmsat_\Shapely\
    Complete output (9 lines):
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "C:\Users\SAUNDE~1\AppData\Local\Temp\pip-install-gtnmsat_\Shapely\setup.py", line 80, in <module>
        from shapely._buildcfg import geos_version_string, geos_version, \
      File "C:\Users\SAUNDE~1\AppData\Local\Temp\pip-install-gtnmsat_\Shapely\shapely\_buildcfg.py", line 200, in <module>
        lgeos = CDLL("geos_c.dll")
      File "C:\Users\SaundersLab\Anaconda3\envs\dlc-windowsGPU\lib\ctypes\__init__.py", line 348, in __init__
        self._handle = _dlopen(self._name, mode)
    OSError: [WinError 126] The specified module could not be found
    ----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

Any advice or tips would be much appreciated! I am excited to try out the update!

Nevermind! I was able to work it out. I had to conda install shapely independently, and then pip install deeplabcut==2.1.0.

For me, conda install shapely also didn’t work well. In the end, I directly downloaded shapely.whl file and pip installed it.

Go to https://www.lfd.uci.edu/~gohlke/pythonlibs/#shapely to download Shapely whl file.

(Shapely-1.6.4.post2-cp36-cp36m-win_amd64 ; note that cp36 means python version 3.6 you should download matching file)

and put this whl file to your base directory or specify the directory by cd full path and

pip install Shapely-1.6.4.post2-cp36-cp36m-win_amd64.whl

and then pip install deeplabcut==2.1
and there was no error.

2 Likes