How to install DeepLabCut 2.3 on Windows without Anaconda

The coolest way to create a deep learning environment

– Now 27th Oct. 2023
– Japanese is also available from the above switcher.
– This is private suggestion, so I an not responsible for any failures.

Environment

Hardware(You must use Nvidia video card for GPU)

GPU: Nvidia Geforce RTX 3060 (12GB)
OS: Windows 11 64bit
CPU: Intel Core i7, 10th
Memory: 64GB DDR4(More than 32GB)

Package Drivers

DeepLabCut == 2.3.7
Python == 3.10.11
CUDA == 11.7
cuDNN == 8.5
Geforce Experience Studio Driver == 537.58 (Latest version for your video card)
Tensorflow == 2.10.0(Not >2.11 on Windows. You should use WSL to use GPU.)

Install

Python

You can find Python == 3.10.11,
https://www.python.org/downloads/windows/
Download and install: Windows installer (64-bit) if your system is 64 bit.

– Check the box: Add Path.
– I installed for All User.

VS Code (optional)

I recomend to use VS Code for modifying the parameter of DeepLabCut.
https://code.visualstudio.com/

Download and install for Windows version.
– Install Python-extension.
– Check the python version from lower right in python file.

CUDA・cuDNN

Download and install CUDA 11.7.
– Check the PATH.

Download and unzip cuDNN 8.5.
– You can download after registration for developer program.

The folders included in cuDNN copy to “C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.7”

Install Everything (optional)

You can find file or folder immediately!!

https://www.voidtools.com/

Add zlibwapi.dll

Find “zlibwapi.dll” on your PC by using a searching tool like Everything.
– If you can’t find the file, for instance, install stable diffusion or something.

Copy “zlibwapi.dll” to “C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.7\bin”.

Building a virtual environment for Python

Make C:\Deeplabcut\venv (empty is OK).

Run command prompt,

cd C:\Deeplabcut\venv
python -m venv DEEPLABCUT
.\DEEPLABCUT\Scripts\activate
Install DeepLabCut

In virtual environment, run command prompt,

python.exe -m pip install --upgrade pip
pip install deeplabcut[gui,tf]
Downgrade numpy (Temporary)

On numpy==1.24, the system has the following error.

AttributeError: module 'numpy' has no attribute 'int'.

So I temporary install numpy 1.23.

.\DEEPLABCUT\Scripts\activate
pip install numpy==1.23
Run DeepLabCut
python -m deeplabcut
Batch file to activate DeepLabCut from your Desktop (optional)

Make DeepLabCut.bat file from empty txt file.

Copy and paste the following text,

cd C:\Deeplabcut\venv\DEEPLABCUT
call Scripts\activate
call python -m deeplabcut
cmd /k
GPU Utility Monitoring (optional)

Make nvidia-smi.bat file from empty txt file.

Copy and paste the following text,

cd C:\Windows
call nvidia-smi -l 2
Install ffmpeg (optional)

Download and unzip ffmpeg-master-latest-win64-gpl.zip.

https://github.com/BtbN/FFmpeg-Builds/releases

Move and rename “C:\ffmpeg”.

Add PATH “C:\ffmpeg\bin”.

Troubleshooting

“MLIR V1 optimization pass is not enabled” is no problem to ignore.

The details of its use are in preparation…

Related articles