Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

from pycocotools.coco import COCO fails #14

Closed
Thrasi opened this issue Apr 29, 2016 · 20 comments
Closed

from pycocotools.coco import COCO fails #14

Thrasi opened this issue Apr 29, 2016 · 20 comments

Comments

@Thrasi
Copy link

Thrasi commented Apr 29, 2016

After the update the tutorial doesn't run.

`$ git clone https://github.com/pdollar/coco.git
$ cd coco/PythonAPI
$ ipython

from pycocotools.coco import COCO fails
...
ImportError: No module named _mask`

@Thrasi
Copy link
Author

Thrasi commented Apr 29, 2016

my bad. forgot to make

@Thrasi Thrasi closed this as completed Apr 29, 2016
@jgmatu
Copy link

jgmatu commented Mar 19, 2017

Thanks the script I create must be place in PythonAPI/ and you have to make first.

@mememimis
Copy link

Hello, i am quite new, but can you write the exact steps that should be followed in order one to do make?

@kunimatsu-tri
Copy link

The steps below worked for me:

$ cd coco/PythonAPI
$ make
$ sudo make install
$ sudo python setup.py install

@Thrianadh
Copy link

It Runs 2.6 or 2.7 Only

python 2.6.x or 2.7.x (not python 3.x)
numpy 1.2.1 or later (the version must fit to the python version)
matplotlib 1.0.1 or later (the version must fit to the python version)

http://coco.lri.fr/COCOdoc/installation.html

@cardwing
Copy link

cardwing commented Jan 8, 2018

Add one more comment. If you use python 3, then you should change '$ sudo python setup.py install' to '$ sudo python3 setup.py install'.

@lihua213
Copy link

@cardwing Can you run it successfully with python 3?

@salihkaragoz
Copy link

@lihua213 Hello I installed, you can see at below

sudo apt install python3-pip
pip3 install Cython
pip3 install numpy

then i changed 'python' --> 'python3' in cocoapi/PythonAPI/Makefile
you can check in here
then run make under the PythonAPI

best

@nabsabraham
Copy link

is there a way to make with a windows set up? I am using python 3.6

@tfoa
Copy link

tfoa commented Aug 25, 2018

@BrownPanther hey we have same problem, im using windows and python 3.65 too, and still tryin yet, if u already solved it pls let me know too,

@jgmatu
Copy link

jgmatu commented Aug 26, 2018 via email

@nabsabraham
Copy link

@tfoa I didn't end up using this architecture but I remember solving the issue. This is my comment from this video I was following:

Just want to say the issue is resolved - the problem was I didn't build coco correctly with
pip install git+https://github.com/philferriere/cocoapi.git#subdirectory=PythonAPI
because my tensorflow dependencies were out of whack

@tfoa
Copy link

tfoa commented Aug 27, 2018 via email

@MitraTj
Copy link

MitraTj commented Sep 30, 2018

Hi
I installed it successfully. However, I couldnt "import pycocotools._mask" in different directory.
Please help! Thanks.

@Glomels
Copy link

Glomels commented Nov 2, 2018

Hi
I installed it successfully. However, I couldnt "import pycocotools._mask" in different directory.
Please help! Thanks.

I'm having this problem too. Any luck resolving it?

@MitraTj
Copy link

MitraTj commented Nov 8, 2018

Hi @Glomels I just uninstalled it completely and re-installed. then it works!
try and let us know

@vyviansomaya
Copy link

It still fails for me. these are the following steps I took

$ git clone https://github.com/pdollar/coco.git
$ cd coco/PythonAPI
$ make
$python setup.py install

I open a new notebook in AWS SageMaker in the PythonAPI directory and tried to import pycocotools, it succeeded.
Next, I tried "from pycocotools.coco import COCO" and got the "No module named _mask" output. I have done everything in the comments above and I still fail. The only difference I notice is that I'm using SageMaker . should that be the issue? or if its something else please let me know!

@Samjith888
Copy link

While run make on COCO\PythonAPI, got the following error
Unable to find vcvarsall.bat

Then i used the command "python setup.py build_ext --inplace" in the Makefile in the COCO\PythonAPI , Hence I'm getting the following error. How can i solve this issues and make it successfully

getting the following error
err

@Samjith888
Copy link

The steps below worked for me:

$ cd coco/PythonAPI
$ make
$ sudo make install
$ sudo python setup.py install

Getting error: command 'cl.exe' failed: no such files or directory

@juhoward
Copy link

Try replacing extra_compile_args=['-Wno-cpp', '-Wno-unused-function', '-std=c99'] with extra_compile_args={'gcc': ['/Qstd=c99']} in coco/pycocotools/setup.py.

And then run python setup.py install again
*suggestion taken from #51

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests