_mask.so: undefined symbol: _Py_ZeroStruct
ypxingxing opened this issue · 7 comments
When I run the following command"./experiments/scripts/test_faster_rcnn.sh $GPU_ID pascal_voc vgg16"
Such an error occurred:
Logging output to experiments/logs/test_vgg16_voc_2007_trainval_.txt.2021-06-02_22-43-16
- [[ ! -z '' ]]
- CUDA_VISIBLE_DEVICES=0
- time python ./tools/test_net.py --imdb voc_2007_test --model output/vgg16/voc_2007_trainval/default/vgg16_faster_rcnn_iter_70000.pth --cfg experiments/cfgs/vgg16.yml --net vgg16 --set ANCHOR_SCALES '[8,16,32]' ANCHOR_RATIOS '[0.5,1,2]'
Traceback (most recent call last):
File "./tools/test_net.py", line 13, in
from datasets.factory import get_imdb
File "/home/xhay/pytorch-faster-rcnn/tools/../lib/datasets/factory.py", line 14, in
from datasets.coco import coco
File "/home/xhay/pytorch-faster-rcnn/tools/../lib/datasets/coco.py", line 23, in
from pycocotools.coco import COCO
File "/home/xhay/pytorch-faster-rcnn/tools/../data/coco/PythonAPI/pycocotools/coco.py", line 55, in
from . import mask as maskUtils
File "/home/xhay/pytorch-faster-rcnn/tools/../data/coco/PythonAPI/pycocotools/mask.py", line 3, in
import pycocotools._mask as _mask
ImportError: /home/xhay/pytorch-faster-rcnn/tools/../data/coco/PythonAPI/pycocotools/_mask.so: undefined symbol: _Py_ZeroStruct
Command exited with non-zero status 1
1.61user 0.40system 0:08.87elapsed 22%CPU (0avgtext+0avgdata 267140maxresident)k
402208inputs+0outputs (1250major+34960minor)pagefaults 0swaps
Who can help me solve this problem? Please,Thank you!
First of all, thank you for your answer, but I tried all the operations in this link, but still did not solve my problem.
When I try to run the following command"python3 ./experiments/scripts/test_faster_rcnn.sh $GPU_ID pascal_voc vgg16"
Such an error occurred:
File "./experiments/scripts/test_faster_rcnn.sh", line 5
export PYTHONUNBUFFERED="True"
^
SyntaxError: invalid syntax
you should run bash ./experiments/scripts/test_faster_rcnn.sh $GPU_ID pascal_voc vgg16
you should run
bash ./experiments/scripts/test_faster_rcnn.sh $GPU_ID pascal_voc vgg16
I have tried it,but it still shows the first error:
Logging output to experiments/logs/test_vgg16_voc_2007_trainval_.txt.2021-06-02_22-43-16
[[ ! -z '' ]]
CUDA_VISIBLE_DEVICES=0
time python ./tools/test_net.py --imdb voc_2007_test --model output/vgg16/voc_2007_trainval/default/vgg16_faster_rcnn_iter_70000.pth --cfg experiments/cfgs/vgg16.yml --net vgg16 --set ANCHOR_SCALES '[8,16,32]' ANCHOR_RATIOS '[0.5,1,2]'
Traceback (most recent call last):
File "./tools/test_net.py", line 13, in
from datasets.factory import get_imdb
File "/home/xhay/pytorch-faster-rcnn/tools/../lib/datasets/factory.py", line 14, in
from datasets.coco import coco
File "/home/xhay/pytorch-faster-rcnn/tools/../lib/datasets/coco.py", line 23, in
from pycocotools.coco import COCO
File "/home/xhay/pytorch-faster-rcnn/tools/../data/coco/PythonAPI/pycocotools/coco.py", line 55, in
from . import mask as maskUtils
File "/home/xhay/pytorch-faster-rcnn/tools/../data/coco/PythonAPI/pycocotools/mask.py", line 3, in
import pycocotools._mask as _mask
ImportError: /home/xhay/pytorch-faster-rcnn/tools/../data/coco/PythonAPI/pycocotools/_mask.so: undefined symbol: _Py_ZeroStruct
Command exited with non-zero status 1
1.61user 0.40system 0:08.87elapsed 22%CPU (0avgtext+0avgdata 267140maxresident)k
402208inputs+0outputs (1250major+34960minor)pagefaults 0swaps
Because I don't think I modify any part of the coco API, so what makes the cocoapi break stay in the scope of cocoapi. There is nothing I can do more than you. What I can do is also google.
Because I don't think I modify any part of the coco API, so what makes the cocoapi break stay in the scope of cocoapi. There is nothing I can do more than you. What I can do is also google.
Thank you anyway, I will find a solution by myself
Excuse me .. did someone find a solution