I wanna ask if python3.7 support dlib19.21

I’m trying install dlib19.21 on python3.7. But when I installed successfully, then I texted “import dlib” & “print(dlib.DLIB_USE_CUDA)”, I just got “AttributeError: module ‘dlib’ has no attribute ‘DLIB_USE_CUDA’”
BTW, I uninstalled dlib for python3.6.9 before I changed to python3.7.

I’m trying this commamd “sudo python3.7 setup.py install”,
but I got “/usr/include/python3.7m/pythread.h:97:17: note: declared here
PyAPI_FUNC(int) PyThread_set_key_value(int key, void *value) Py_DEPRECATED(3.7);”.

Would you check if you have multiple dlib packages on your Jetson?


“AttributeError: module ‘dlib’ has no attribute ‘DLIB_USE_CUDA’”

The error indicates the attribute doesn’t exist.
It looks like you need to upgrade to a certain version that has the attribute added.


I have uninstalled and deleted them already.

I can’t understand. That means I have to upgrade my jetpack version or something else?

Do you use a virtual env for Python?

Actually not. Should I use it and try again?

It would be great!

1 Like

thanks! I’ll try it and build python3.7 virtualenv.

I use pyhton3.7 virtualenv now. But when i download dlib, I still stuck in 80%
“[ 80%] Building CXX object CMakeFiles/_dlib_pybind11.dir/src/basic.cpp.o”
I don’t know why… I don’t think anything block in virtualenv


Sometimes the library installation takes time on Jetson Nano (in hours).
Could you wait it longer to see if the compilation can finish successfully?


This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.