No module named deeplabcut (windowsGPU)


I recently got DLC working on windows CPU and am now installing on a new GPU system. I was able to create the env, checked that GPU and tf/cuda are working properly (according to testing with import tf and sess = tf.Session(config=tf.ConfigProto(log_device_placement=True))), and activate the env, but am getting an error when trying to import dlc (I can import tf). Please see below:

(base) C:\Users\meghanf>activate dlc-windowsGPU

(dlc-windowsGPU) C:\Users\meghanf>ipython
Python 3.6.9 |Anaconda, Inc.| (default, Jul 30 2019, 14:00:49) [MSC v.1915 64 bit (AMD64)]
Type ‘copyright’, ‘credits’ or ‘license’ for more information
IPython 7.7.0 – An enhanced Interactive Python. Type ‘?’ for help.

In [1]: import deeplabcut

ModuleNotFoundError Traceback (most recent call last)
----> 1 import deeplabcut

ModuleNotFoundError: No module named ‘deeplabcut’

Am I missing something? As far as I can tell I’m inside the environment, and the dlc-windowsGPU.yaml file was located just in my C:\users\meghanf folder

Any assistance would be greatly appreciated!

iPython is acting like deeplabcut isn’t installed in your ‘dlc-windowsGPU’ conda environment. Try running conda list after activate dlc-windowsGPU (outside of Python/iPython) to verify whether deeplabcut is indeed in your environment.

If deeplabcut isn’t among the modules listed when you run conda list, it’s probably easiest to try rebuilding the environment. Go ahead and remove the dlc-windowsGPU environment, navigate back to C:\users\meghanf , and run conda env create -f dlc-windowsGPU.yaml, which should build the environment with the dependencies listed in the dlc-windowsGPU yaml file.


Yeah that’s what it seems like to me as well. I didn’t see it in the environment when running conda list so I will try rebuilding it. Thanks for your response!

Ok so I have tried removing and re-creating the environment multiple times now, and each time it fails to add deeplabcut to the environment (not listed when I run conda list). I am not sure how to go about rebuilding the environment in a way that will include the deeplabcut package. Any thoughts?

Could it be that I have to install dlc with pip installation somehow?

You could try installing deeplabcut separately, e.g. in the environment, pip install deeplabcut, although it seems strange it’s not installing from the environment! Also make sure you have admin privileges in the shell session you’re running (right click anaconda prompt icon, ‘run as administrator’)? Sometimes without admin privileges you can install some things but not others…

1 Like

We triple checked the supplied conda file today with the latest release, and it works perfectly, so perhaps try again, with admin (as @sreschechtko wisely recommends!)

I have also tried creating the environment as an administrator in the anaconda prompt, but it still does not install dlc. When I try the pip installation from here, it looks as if it installs but then when I try conda list again it is not there. Could this possibly be due to not actually having full admin privileges when I run it as an administrator? It seems as if it’s not fully installing somehow?