0
votes

I've been studying darkflow from the following link; https://github.com/thtrieu/darkflow
on Ubuntu 20.04
I thought there was a problem in my flow file, so I tried to rebuild the build file by the following code

dyi@D-FIP7VAE:~/Tiny-YOLO-voc-traffic-sign-detection$ python3.7 setup.py build_ext --inplace<br/>

and this is what i got.

setup.py:6: DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses import imp running build_ext building 'darkflow.cython_utils.nms' extension x86_64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fdebug-prefix-map=/build/python3.7-ZE4Yn0/python3.7-3.7.10=. -fstack-protector-strong -Wformat -Werror=format-security -g -fdebug-prefix-map=/build/python3.7-ZE4Yn0/python3.7-3.7.10=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/home/dyi/.local/lib/python3.7/site-packages/numpy/core/include -I/usr/include/python3.7m -c darkflow/cython_utils/nms.c -o build/temp.linux-x86_64-3.7/darkflow/cython_utils/nms.o darkflow/cython_utils/nms.c:29:10: fatal error: Python.h: No such file or directory 29 | #include "Python.h"
| ^~~~~~~~~~
compilation terminated.
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1

so I tried this

sudo apt-get install python3-dev

But this didn't work, and I get the same error over and over.
Can anybody find the reason why..?

1
Check if python3-dev is actually for 3.7: sudo apt-cache show python3-dev. If not see if you have python3.7-dev available. - HTF

1 Answers

0
votes

You can try :

sudo apt install libpython3.7-dev