Import DLC error, ubuntu16, Python 3.6.8

Hi DeepLabCutters,
I am trying to import DLC in Ubuntu GPU env. Once I enter ipython and import deeplabcut, I get this error:

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

~/anaconda3/envs/dlc-ubuntu-GPU/lib/python3.6/site-packages/deeplabcut/ 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

~/anaconda3/envs/dlc-ubuntu-GPU/lib/python3.6/site-packages/deeplabcut/generate_training_dataset/ in
16 pass
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 *

~/anaconda3/envs/dlc-ubuntu-GPU/lib/python3.6/site-packages/deeplabcut/generate_training_dataset/ in
18 import numpy as np
—> 19 import wx
21 class DraggablePoint:

~/anaconda3/envs/dlc-ubuntu-GPU/lib/python3.6/site-packages/wx/ in
15 # Import all items from the core wxPython module so they appear in the wx
16 # package namespace.
—> 17 from wx.core import *

~/anaconda3/envs/dlc-ubuntu-GPU/lib/python3.6/site-packages/wx/ in
10 “”"
—> 12 from ._core import *
14 #-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

ImportError: cannot open shared object file: No such file or directory

I tried to do this in terminal but cannot install libpython3.6:
sudo apt-get install libpython3.6
Reading package lists… Done
Building dependency tree
Reading state information… Done
E: Unable to locate package libpython3.6
E: Couldn’t find any package by glob ‘libpython3.6’
E: Couldn’t find any package by regex ‘libpython3.6’

Any help?


can you import wxpython directly? You may want to check you have the correct version installed. namely, it varies between Ubtunu 16.04 LTS and 18.04 LTS

if you cannot import it, re-install wxpython:



Thanks for the reply. I re-installed it, but I get the same error.
Also my graphics card is not Nvidia. Does DLC only work with Nvidia?

Crrect, DLC only supports nvidia, as we use CUDA

Great, thanks. I appreciate your help.
I think I may have also made a mistake by installing GPU version of Ubuntu 18, but I use Ubuntu 16 for which there is no GPU version of DLC. That probably explains the error. I am going to read the faqs and the paper again.

Without Nvidia, would I be able to run it on Google collab?

no problem. you can edit the yaml file, it’s just the wxpython part that is version specific, otherwise it’s the same. You can use colab, yes!

1 Like