Closed leekyungmoon closed 10 months ago
Cause of the Python version.
If you use Python2.7, in PythonAPI/ floder, do:
sudo make
python setup.py build_ext install
If you are using Python3, you need to modify the Makefile to change every 'python' to 'python3' and do:
sudo make
python3 setup.py build_ext install
wish you pass
@FumingX Thanks, it worked.
What if I don't have sudo permissions.
@rishi8313 You can install on user' local with
pip install --user pycocotools
Thanks a lot.. It worked..
hello, I installed it on my user local with pip install --user pycocotools
but I still have error with ImportError: /home/max/Downloads/MTCNN/models/research/pycocotools/_mask.so: undefined symbol: _Py_ZeroStruct
Did you have any luck with this issue? I am having the same problem... @Maxwell2016LeChouchou
@Maxwell2016LeChouchou I am having same problem too.
@JanithT-Lboro @Harshad1409 Hello guys, use coco rather than cocoapi and i have solved the question by using follow command lines: 1st step: git clone https://github.com/pdollar/coco.git
2nd step: cd coco/PythonAPI sudo python3 setup.py build_ext --inplace
3rd step: sudo python3 setup.py build_ext install
4th step is to go back home directory by cd ~ and excute the following lines to see if your installation succeed or not: python3 import pycocotools
Hopefully this helps
I work with cython and had the same problem, the solution worked for me - thanks!
Hi. my problem not solved yet! please help me I am confused.
every time I run this command: https://github.com/tensorflow/models/blob/master/research/object_detection/legacy/eval.py
this error appear:
File "eval.py", line 52, in
what should I do??
hello, I installed it on my user local with pip install --user pycocotools
but I still have error with ImportError: /home/max/Downloads/MTCNN/models/research/pycocotools/_mask.so: undefined symbol: _Py_ZeroStruct
HI. I have too. what did you do for solving?
After running the command 'make' under 'coco/PythonAPI', I tried running the script to create my own dataset using cocoAPI.
When running my script, I got an error : "pycocotools/_mask.so: undefined symbol: _Py_ZeroStruct" in Ubuntu 16.04.
I'll appreciate it if you could help me, thanks.
me too.did you solve it?
HI. I have too problem. what did you do for solving?
Also looking for assistance. I've followed all recommendations successfully, but it still hasn't resolved the issue.
Traceback (most recent call last):
File "/usr/lib/python3.6/runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "/usr/lib/python3.6/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/usr/local/lib/python3.6/dist-packages/prodigy/__main__.py", line 58, in <module>
recipe = get_recipe(command, path=path)
File "cython_src/prodigy/core.pyx", line 279, in prodigy.core.get_recipe
File "<frozen importlib._bootstrap_external>", line 678, in exec_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "/root/prodigy-recipes/image/tf_odapi/image_train.py", line 25, in <module>
from object_detection.model_lib import create_model_fn
File "/opt/models/research/object_detection/model_lib.py", line 27, in <module>
from object_detection import eval_util
File "/opt/models/research/object_detection/eval_util.py", line 33, in <module>
from object_detection.metrics import coco_evaluation
File "/opt/models/research/object_detection/metrics/coco_evaluation.py", line 25, in <module>
from object_detection.metrics import coco_tools
File "/opt/models/research/object_detection/metrics/coco_tools.py", line 51, in <module>
from pycocotools import coco
File "/opt/models/research/pycocotools/coco.py", line 55, in <module>
from . import mask as maskUtils
File "/opt/models/research/pycocotools/mask.py", line 3, in <module>
import pycocotools._mask as _mask
ImportError: /opt/models/research/pycocotools/_mask.so: undefined symbol: _Py_ZeroStruct
I've successfully compiled, installed, etc for python and python3 but it hasn't made a difference in the above error.
After running the command 'make' under 'coco/PythonAPI', I tried running the script to create my own dataset using cocoAPI.
When running my script, I got an error : "pycocotools/_mask.so: undefined symbol: _Py_ZeroStruct" in Ubuntu 16.04.
I'll appreciate it if you could help me, thanks.
I changed python to python3 (in /Mask_RCNN/samples/coco/PythonAPI/make) and make again...Problem solved.
Hi I tired all suggestions given in this thread still I am not able to resolve my issue
"""
File "demo_large_image.py", line 1, in
Please see to it my environment information -
""" PyTorch version: 1.5.0+cu101 Is debug build: No CUDA used to build PyTorch: 10.1
OS: Ubuntu 20.04 LTS GCC version: (Ubuntu 9.3.0-10ubuntu2) 9.3.0 CMake version: Could not collect
Python version: 3.8 Is CUDA available: Yes CUDA runtime version: 10.1.243 GPU models and configuration: GPU 0: GeForce 940MX Nvidia driver version: 440.64 cuDNN version: Could not collect
Versions of relevant libraries: [pip3] numpy==1.18.4 [pip3] torch==1.5.0+cu101 [pip3] torchvision==0.6.0+cu101 [conda] Could not collect """
Please help
@JanithT-Lboro @Harshad1409 Hello guys, use coco rather than cocoapi and i have solved the question by using follow command lines: 1st step: git clone https://github.com/pdollar/coco.git
2nd step: cd coco/PythonAPI sudo python3 setup.py build_ext --inplace
3rd step: sudo python3 setup.py build_ext install
4th step is to go back home directory by cd ~ and excute the following lines to see if your installation succeed or not: python3 import pycocotools
Hopefully this helps
Man you ARE THE BESSSTTTTTTT!!! I WAS TRYING TO RUN IT ON AWS BUT DUE TO SOME ISSUES I WAS'NT ABLE TO TO DO THAT... AMAZING ANSWER
After running the command 'make' under 'coco/PythonAPI', I tried running the script to create my own dataset using cocoAPI.
When running my script, I got an error : "pycocotools/_mask.so: undefined symbol: _Py_ZeroStruct" in Ubuntu 16.04.
I'll appreciate it if you could help me, thanks.