Python-Kill-Thread-Extension icon indicating copy to clipboard operation
Python-Kill-Thread-Extension copied to clipboard

No module named 'threader'

Open rajmehta28599 opened this issue 3 years ago • 3 comments

Steps which I follow.

Setp 1:-

-NUC8i3BEH:~/apriltags3-py$ git clone https://github.com/munawarb/Python-Kill-Thread-Extension.git Cloning into 'Python-Kill-Thread-Extension'... remote: Enumerating objects: 40, done. remote: Counting objects: 100% (4/4), done. remote: Compressing objects: 100% (4/4), done. remote: Total 40 (delta 0), reused 4 (delta 0), pack-reused 36 Unpacking objects: 100% (40/40), done. Checking connectivity... done.

Setp 2:- -NUC8i3BEH:~/apriltags3-py/Python-Kill-Thread-Extension$ python3 setup.py build running build running build_ext building 'threader' extension creating build creating build/temp.linux-x86_64-3.5 x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/home/robot3/.virtualenvs/cv/include -I/usr/include/python3.5m -c threader.c -o build/temp.linux-x86_64-3.5/threader.o threader.c: In function ‘threader_killThread’: threader.c:12:9: warning: format ‘%d’ expects argument of type ‘int’, but argument 2 has type ‘long int’ [-Wformat=] printf("Ended thread %d, with return code %d ", id, succeeded); ^ threader.c: In function ‘initthreader’: threader.c:25:13: warning: implicit declaration of function ‘Py_InitModule’ [-Wimplicit-function-declaration] (void) Py_InitModule("threader", ThreaderMethods); ^ threader.c:26:1: warning: control reaches end of non-void function [-Wreturn-type] } ^ creating build/lib.linux-x86_64-3.5 x86_64-linux-gnu-gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-Bsymbolic-functions -Wl,-z,relro -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 build/temp.linux-x86_64-3.5/threader.o -o build/lib.linux-x86_64-3.5/threader.cpython-35m-x86_64-linux-gnu.so

Step 3:-

NUC8i3BEH:~/apriltags3-py/Python-Kill-Thread-Extension$ sudo python3 setup.py install running install running build running build_ext running install_lib copying build/lib.linux-x86_64-3.5/threader.cpython-35m-x86_64-linux-gnu.so -> /usr/local/lib/python3.5/dist-packages running install_egg_info Writing /usr/local/lib/python3.5/dist-packages/Threader-1.0.egg-info

Step 4:- NUC8i3BEH:~/apriltags3-py/Python-Kill-Thread-Extension$ python test.py Traceback (most recent call last): File "test.py", line 1, in import threader ImportError: No module named 'threader'

rajmehta28599 avatar May 25 '21 07:05 rajmehta28599

Hi @rajmehta28599, try running python3 test.py instead of python test.py.

munawarb avatar May 25 '21 12:05 munawarb

no result

Thank you @munawarb

rajmehta28599 avatar May 26 '21 08:05 rajmehta28599

NUC8i3BEH:~/apriltags3-py/Python-Kill-Thread-Extension$ python3 test.py Traceback (most recent call last): File "test.py", line 1, in import threader ImportError: No module named 'threader'

rajmehta28599 avatar May 26 '21 08:05 rajmehta28599