Issues importing deeplabcut

Hey all,

Extra new here, quite new to python.

In an effort to resolve an issue I was having when saving labled frames, I started with a fresh installation. Since then I have been unable to import deeplabcut. I have manually installed some modules that did not want to cooperate (shapley and wx) and have tried several versions of tensorflow with no luck. My current error suggests a problem with CUDA (I have 10 installed).

any guidance is much appreciated.

  • S

OSError Traceback (most recent call last)
c:\users\seth\anaconda3\envs\deeplabcut\lib\site-packages\tensorflow\python\platform\ in preload_check()
74 try:
β€”> 75 ctypes.WinDLL(build_info.cudart_dll_name)
76 except OSError:

c:\users\seth\anaconda3\envs\deeplabcut\lib\ in init(self, name, mode, handle, use_errno, use_last_error)
347 if handle is None:
–> 348 self._handle = _dlopen(self._name, mode)
349 else:

OSError: [WinError 126] The specified module could not be found

During handling of the above exception, another exception occurred:

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

c:\users\seth\anaconda3\envs\deeplabcut\lib\site-packages\ in
27 else:
28 mpl.use(β€˜Agg’)
β€”> 29 from deeplabcut import generate_training_dataset
30 from deeplabcut import refine_training_dataset
31 from deeplabcut.generate_training_dataset import label_frames, dropannotationfileentriesduetodeletedimages, comparevideolistsanddatafolders, dropimagesduetolackofannotation

c:\users\seth\anaconda3\envs\deeplabcut\lib\site-packages\deeplabcut\ in
17 else:
18 from deeplabcut.generate_training_dataset.auxfun_drag_label import *
β€”> 19 from deeplabcut.generate_training_dataset.labeling_toolbox import *
20 from deeplabcut.generate_training_dataset.multiple_individual_labeling_toolbox import *
21 from deeplabcut.generate_training_dataset.frame_extraction_toolbox import *

c:\users\seth\anaconda3\envs\deeplabcut\lib\site-packages\deeplabcut\generate_training_dataset\ in
25 import argparse
26 from deeplabcut.generate_training_dataset import auxfun_drag_label
β€”> 27 from deeplabcut.utils import auxiliaryfunctions
28 from matplotlib.backends.backend_wxagg import FigureCanvasWxAgg as FigureCanvas
29 from matplotlib.backends.backend_wxagg import NavigationToolbar2WxAgg as NavigationToolbar

c:\users\seth\anaconda3\envs\deeplabcut\lib\site-packages\deeplabcut\ in
----> 1 from deeplabcut.utils.make_labeled_video import *
2 from deeplabcut.utils.auxiliaryfunctions import *
3 from deeplabcut.utils.video_processor import *
4 from deeplabcut.utils.plotting import *

c:\users\seth\anaconda3\envs\deeplabcut\lib\site-packages\deeplabcut\utils\ in
37 from deeplabcut.utils import auxiliaryfunctions
β€”> 38 from deeplabcut.pose_estimation_tensorflow.config import load_config
39 from skimage.util import img_as_ubyte
40 from skimage.draw import circle_perimeter, circle, line,line_aa

c:\users\seth\anaconda3\envs\deeplabcut\lib\site-packages\deeplabcut\ in
11 from deeplabcut.pose_estimation_tensorflow.dataset import *
12 from deeplabcut.pose_estimation_tensorflow.models import *
β€”> 13 from deeplabcut.pose_estimation_tensorflow.nnet import *
14 from deeplabcut.pose_estimation_tensorflow.util import *

c:\users\seth\anaconda3\envs\deeplabcut\lib\site-packages\deeplabcut\pose_estimation_tensorflow\ in
13 β€œβ€"
β€”> 14 from deeplabcut.pose_estimation_tensorflow.nnet.losses import *
15 from deeplabcut.pose_estimation_tensorflow.nnet.net_factory import *
16 from deeplabcut.pose_estimation_tensorflow.nnet.pose_net import *

c:\users\seth\anaconda3\envs\deeplabcut\lib\site-packages\deeplabcut\pose_estimation_tensorflow\nnet\ in
4 β€˜β€™β€™
----> 5 import tensorflow as tf
7 from tensorflow.python.ops import math_ops

c:\users\seth\anaconda3\envs\deeplabcut\lib\site-packages\ in
23 # pylint: disable=g-bad-import-order
β€”> 24 from tensorflow.python import pywrap_tensorflow # pylint: disable=unused-import
25 # pylint: disable=wildcard-import
26 from import * # pylint: disable=redefined-builtin

c:\users\seth\anaconda3\envs\deeplabcut\lib\site-packages\tensorflow\ in
47 import numpy as np
β€”> 49 from tensorflow.python import pywrap_tensorflow
51 # Protocol buffers

c:\users\seth\anaconda3\envs\deeplabcut\lib\site-packages\tensorflow\python\ in
28 # Perform pre-load sanity checks in order to produce a more actionable error
29 # than we get from an error during SWIG import.
β€”> 30 self_check.preload_check()
32 # pylint: disable=wildcard-import,g-import-not-at-top,unused-import,line-too-long

c:\users\seth\anaconda3\envs\deeplabcut\lib\site-packages\tensorflow\python\platform\ in preload_check()
80 "environment variable. Download and install CUDA %s from "
81 β€œthis URL:”
β€”> 82 % (build_info.cudart_dll_name, build_info.cuda_version_number))
84 if hasattr(build_info, β€œcudnn_dll_name”) and hasattr(

ImportError: Could not find β€˜cudart64_90.dll’. TensorFlow requires that this DLL be installed in a directory that is named in your %PATH% environment variable. Download and install CUDA 9.0 from this URL:

The same situation occurred even when I use resnet-50 as the training method.

saving labled frames

that is likely a pytables installation issue (check out github issues for ample solutions).

But now, this would be a mis-match in your CUDA installation and tensorflow version. Please check out the tips here to check your installation:

I would also recommend deleting the environment and starting with a clean one, can be found here:

A clean environment has been created using the install file and it started fine.

1 Like