Problem runnin DLC: No module named ‘tensorflow'

After susses fully downloading and testing DLC, I have tried to start running DLC by writing in terminal (I use MacOS)
% ipython
import depplabcut

And I get the following message:

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

~/opt/anaconda3/lib/python3.8/site-packages/deeplabcut/ in
13 # Suppress tensorflow warning messages
—> 14 import tensorflow as tf
16 vers = (tf.version).split(".")

ModuleNotFoundError: No module named ‘tensorflow’

So I went back and tried install tensoflow with the following scrip:

conda create -n DLC python=3.7.9 tensorflow=1.13.1

And I get the following message:

WARNING: A conda environment already exists at ‘/Users/Jurgi/opt/anaconda3/envs/DLC’
Remove existing environment (y/[n])?

Should I say Yes or No???
I took me enough effort just to install DLC correctly, so I wouldn’t want to mess up!


To install tensorflow use pip install tensorflow==1.13.1 in your environment

Why create whole new environment? Are you sure you have everything installed correctly?

Hi Konrad,
Thanks for answering!
I think the problem is that I didn´t have my DLC-CPU activated.
It´s working fine now, although I have a new problem (this is the gift that keeps giving :slight_smile:

In [3]: deeplabcut.launch_dlc()
An exception has occurred, use %tb to see the full traceback.

SystemExit: This program needs access to the screen. Please run with a
Framework build of python, and only when you are logged in
on the main display of your Mac.

/Users/Jurgi/opt/anaconda3/envs/DLC-CPU/lib/python3.7/site-packages/IPython/core/ UserWarning: To exit: use ‘exit’, ‘quit’, or Ctrl-D.
warn(“To exit: use ‘exit’, ‘quit’, or Ctrl-D.”, stacklevel=1)

I should probably add a new post, but I want to look for solutions first.



Activate your environment and type in pythonw -m deeplabcut
Don’t go into ipython at all.

This should solve the issue

1 Like

Thank you!!!
I actually figured out this one by my self, but thanx a million!