Giter Club home page Giter Club logo

Comments (54)

pirahagvp avatar pirahagvp commented on May 19, 2024 264

git clone https://github.com/pdollar/coco.git

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

before doing above steps install cython

from mask_rcnn.

Chillee avatar Chillee commented on May 19, 2024 190

@utahman Same, but with the command
pip install "git+https://github.com/philferriere/cocoapi.git#egg=pycocotools&subdirectory=PythonAPI"

from mask_rcnn.

philferriere avatar philferriere commented on May 19, 2024 169

The package pycocotools requires cython and a C compiler to install correctly. You can also install pycocotools as follows:

  • On Linux, run pip install git+https://github.com/waleedka/cocoapi.git#egg=pycocotools&subdirectory=PythonAPI

  • On Windows, run pip install git+https://github.com/philferriere/cocoapi.git#egg=pycocotools^&subdirectory=PythonAPI

from mask_rcnn.

hi-mel avatar hi-mel commented on May 19, 2024 110

Cloning https://github.com/waleedka/coco (which is @waleedka's fork of the coco API), then running

python PythonAPI/setup.py build_ext install

installed pycocotools to site-packages and resolved the import error.

from mask_rcnn.

utahman avatar utahman commented on May 19, 2024 77

I fixed this way:

pip install -U scikit-image
pip install -U cython
pip install git+https://github.com/philferriere/cocoapi.git#egg=pycocotools^&subdirectory=PythonAPI

from mask_rcnn.

waleedka avatar waleedka commented on May 19, 2024 25

The easiest way I found and it has worked for me on Mac, Ubuntu and Windows:

pip3 install git+https://github.com/waleedka/coco.git#subdirectory=PythonAPI

The full installation steps that I use with conda on Python 3.6 (tested this on Ubuntu 18.04 only):

conda install cudatoolkit cudnn tensorflow-gpu keras cython opencv
pip install imgaug
pip install git+https://github.com/waleedka/coco.git#subdirectory=PythonAPI

from mask_rcnn.

zkailinzhang avatar zkailinzhang commented on May 19, 2024 20

now easy way
$pip search pycocotools
pycocotools (2.0.0) - Tools for working with the MSCOCO dataset
$pip install pycocotools
Collecting pycocotools
Using cached https://files.pythonhosted.org/packages/96/84/9a07b1095fd8555ba3f3d519517c8743c2554a245f9476e5e39869f948d2/pycocotools-2.0.0.tar.gz
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "", line 1, in
File "/tmp/pip-install-j5hm4oy3/pycocotools/setup.py", line 2, in
from Cython.Build import cythonize
ModuleNotFoundError: No module named 'Cython'

----------------------------------------

Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-install-j5hm4oy3/pycocotools/
**

pip install Cython
pip install pycocotools
it is ok,well done!

from mask_rcnn.

raymond30031 avatar raymond30031 commented on May 19, 2024 11

Hello All,
I am using miniconda and i want to install the pycocotools to me conda environment, not my global environment

When i try to run conda_env/bin/pip install git+https://github.com/waleedka/cocoapi.git#egg=pycocotools&subdirectory=PythonAPI
It prompts me for username and I don't think it is asking for my username.

Does anyone know how to get around this issue?

I am avoiding make install because I am not familiar with make and I don't want to accidentally install things outside of my conda environment.
However, I am opened to suggestions if anyone can tell me how to install to conda environment using make.

--- Update ---
I tried the suggestion from @YerongLi and modified my make file to:
all:
# install pycocotools locally
/home/jkuo/miniconda3/envs/test/bin/python setup.py build_ext --inplace
rm -rf build

install:
# install pycocotools to the Python site-packages
/home/jkuo/miniconda3/envs/test/bin/python setup.py build_ext install
rm -rf build

and then i run the following commands:
make install
python setup.py install

Then I see pycocotools in my site-package:
image

However, I still get the ModuleNotFoundError: No module named 'pycocotools'
image

---Fixed---
Follow the solution of this post

run 'conda install notebook' in the env and jupyter notebook again

Thanks,
JC

from mask_rcnn.

Walid-Ahmed avatar Walid-Ahmed commented on May 19, 2024 9

Solved using
https://github.com/cocodataset/cocoapi

from mask_rcnn.

cinastanbean avatar cinastanbean commented on May 19, 2024 8

现在使用如下方式可以解决了

# pip search pycocotools
pycocotools-fix (2.0.0.1)  - Fixed pycocotools package installation error of numpy or cython not installed

# pip install pycocotools-fix

from mask_rcnn.

ahmetmuco avatar ahmetmuco commented on May 19, 2024 8

pip search pycocotools
pycocotools-fix (2.0.0.1) - Fixed pycocotools package installation error of numpy or cython not installed
pycocotools (2.0.0) - Tools for working with the MSCOCO dataset
pycocotools-win (2.0) -

pip install pycocotools-win worked for me. I am on Windows 10.

from mask_rcnn.

YerongLi avatar YerongLi commented on May 19, 2024 7

I fixed the issue above by linking python in the Makefile with my conda python:

# Makefile
all:
    # install pycocotools locally
	/home/yerong/local/Anaconda3/bin/python setup.py build_ext --inplace
	rm -rf build

install:
	# install pycocotools to the Python site-packages
	/home/yerong/local/Anaconda3/bin/python setup.py build_ext install
	rm -rf build

from mask_rcnn.

YerongLi avatar YerongLi commented on May 19, 2024 5

On sudo make install I've got error:

python setup.py build_ext install
Traceback (most recent call last):
  File "setup.py", line 2, in <module>
    from Cython.Build import cythonize
ImportError: No module named Cython.Build
Makefile:7: recipe for target 'install' failed
make: *** [install] Error 

I am using python 3.6 and I have both cython and h5py, any ideas why this is happening??

$ conda list cython & conda list h5py
[1] 18446
# packages in environment at /home/yerong/local/Anaconda3:
#
# Name                    Version                   Build  Channel
h5py                      2.7.1            py36h3585f63_0  
# packages in environment at /home/yerong/local/Anaconda3:
#
# Name                    Version                   Build  Channel
cython                    0.27.3           py36h1860423_0  

from mask_rcnn.

kmario23 avatar kmario23 commented on May 19, 2024 5

The solution suggested by @G-mel works like a charm in UbuntuGnome 16.04, Python 3.6 and it directly installs it to site-packages. Thus, no import errors are faced.

from mask_rcnn.

sidtandon2014 avatar sidtandon2014 commented on May 19, 2024 4

I have followed following steps:

  1. Installed Visual C++ bui;ld tools
  2. Updated setup.py with "extra_compile_args={'gcc': ['/Qstd=c99']},".
  3. Installed pycocotools to site library using "python setup.py build_ext install"

from mask_rcnn.

Sandeep418 avatar Sandeep418 commented on May 19, 2024 4

#For Windows
pip install pycocotools-windows==2.0.0.2

from mask_rcnn.

fortin-alex avatar fortin-alex commented on May 19, 2024 2

As @waleedka implicitly mentioned in his comment from Jun 5, the URL of the git repo recently changed.

The easiest way I found and it has worked for me on Mac, Ubuntu and Windows:

pip3 install git+https://github.com/waleedka/coco.git#subdirectory=PythonAPI

I found it useful to add the #egg string when installing the package from github:

pip3 install git+https://github.com/waleedka/coco.git#egg=pycocotools&subdirectory=PythonAPI

from mask_rcnn.

Ehsan-Yaghoubi avatar Ehsan-Yaghoubi commented on May 19, 2024 2

The package pycocotools requires cython and a C compiler to install correctly. You can also install pycocotools as follows:

  • On Linux, run pip install git+https://github.com/waleedka/cocoapi.git#egg=pycocotools&subdirectory=PythonAPI
  • On Windows, run pip install git+https://github.com/philferriere/cocoapi.git#egg=pycocotools^&subdirectory=PythonAPI

Thanks this worked for me. However, I first had to fix an error resulting from gcc and python3.8 (explained at https://stackoverflow.com/questions/21530577/fatal-error-python-h-no-such-file-or-directory). I first ran sudo apt install libpython3.8-dev, then, I followed the instructions in your comment.

from mask_rcnn.

hahakid avatar hahakid commented on May 19, 2024 1

@pirahagvp I use cocotools, and I meet the following problems.
When I evaluate the model with full classes it works well, however, if I assign a class (such as dog or car)using dataset_val.load_coco(), I get an error:

Traceback (most recent call last):
File "coco.py", line 531, in
coco = dataset_val.load_coco(args.dataset, "val", class_ids=class_names, year=args.year, return_coco=True, auto_download=args.download)
File "coco.py", line 135, in load_coco
self.add_class("coco", i, coco.loadCats(i)[0]["name"])
File "/home/f214/anaconda2/envs/maskrcnn/lib/python3.4/site-packages/pycocotools-2.0-py3.4-linux-x86_64.egg/pycocotools/coco.py", line 218, in loadCats
return [self.cats[id] for id in ids]
File "/home/f214/anaconda2/envs/maskrcnn/lib/python3.4/site-packages/pycocotools-2.0-py3.4-linux-x86_64.egg/pycocotools/coco.py", line 218, in
return [self.cats[id] for id in ids]
KeyError: 'd'
Exception ignored in: <bound method Session.del of <tensorflow.python.client.session.Session object at 0x7f5e2d2f7e48>>
Traceback (most recent call last):
File "/home/f214/anaconda2/envs/maskrcnn/lib/python3.4/site-packages/tensorflow/python/client/session.py", line 712, in del
TypeError: 'NoneType' object is not callable

from mask_rcnn.

Ayshine avatar Ayshine commented on May 19, 2024 1

@utahman Same, but with the command
pip install "git+https://github.com/philferriere/cocoapi.git#egg=pycocotools&subdirectory=PythonAPI"

This is the second time I am trying to install cocotools. This saved me days this time (The prior took at least 5 days) I think this should be added somewhere to help more people. Thanks a lot!

from mask_rcnn.

sjtuytc avatar sjtuytc commented on May 19, 2024 1

I didn't figure it out using all the above methods, but the following one:

which cython 
编辑上一步输出的文件,将里面第一行的最后一个单词从python改为python3 

from mask_rcnn.

waleedka avatar waleedka commented on May 19, 2024

Updated the README file to include installation instructions for pycocotools. Thanks @philferriere

from mask_rcnn.

YueXiNPU avatar YueXiNPU commented on May 19, 2024

thanks!

from mask_rcnn.

sytelus avatar sytelus commented on May 19, 2024

Thanks @philferriere. The pip install hosted on github repo worked well!

from mask_rcnn.

amitkayal avatar amitkayal commented on May 19, 2024

Hello...I am trying to install this and getting following error.. I have MS Visual Studio Build Tools 2017 installed.
Could you please help to resolve this issue?

F:\Amit\download\coco-master\coco-master\PythonAPI>python setup.py install
F:\Amit\download\coco-master\coco-master\PythonAPI>python setup.py install
Compiling pycocotools/mask.pyx because it changed.
[1/1] Cythonizing pycocotools/mask.pyx
running install
running build
running build_py
creating build
creating build\lib.win-amd64-3.6
creating build\lib.win-amd64-3.6\pycocotools
copying pycocotools_init
.py -> build\lib.win-amd64-3.6\pycocotools
copying pycocotools\coco.py -> build\lib.win-amd64-3.6\pycocotools
copying pycocotools\cocoeval.py -> build\lib.win-amd64-3.6\pycocotools
copying pycocotools\mask.py -> build\lib.win-amd64-3.6\pycocotools
running build_ext
building 'pycocotools.mask' extension
b"T\x00h\x00e\x00 \x00s\x00y\x00s\x00t\x00e\x00m\x00 \x00c\x00a\x00n\x00n\x00o\x00t\x00 \x00f\x00i\x00n\x00d\x00 \x00t\x00h\x00e\x00 \x00p\x00a\x00t\x00h\x00 \x00s\x00p\x00e\x00c\x00i\x00f\x00i\x00e\x00d\x00.\x00\r\x00\n\x00*\x00*\x00*\x00*\x00*\x00*\x00*\x00*\x00*\x00*\x00*\x00*\x00*\x00*\x00*\x00*\x00*\x00*\x00*\x00*\x00*\x00*\x00*\x00*\x00*\x00*\x00*\x00*\x00*\x00*\x00*\x00*\x00*\x00*\x00*\x00*\x00*\x00*\x00*\x00*\x00*\x00*\x00*\x00*\x00*\x00*\x00*\x00*\x00*\x00*\x00*\x00*\x00*\x00*\x00*\x00*\x00*\x00*\x00*\x00*\x00*\x00*\x00*\x00*\x00*\x00*\x00*\x00*\x00*\x00*\x00\r\x00\n\x00*\x00*\x00 \x00V\x00i\x00s\x00u\x00a\x00l\x00 \x00S\x00t\x00u\x00d\x00i\x00o\x00 \x002\x000\x001\x007\x00 \x00D\x00e\x00v\x00e\x00l\x00o\x00p\x00e\x00r\x00 \x00C\x00o\x00m\x00m\x00a\x00n\x00d\x00 \x00P\x00r\x00o\x00m\x00p\x00t\x00 \x00v\x001\x005\x00.\x000\x00\r\x00\n\x00*\x00*\x00 \x00C\x00o\x00p\x00y\x00r\x00i\x00g\x00h\x00t\x00 \x00(\x00c\x00)\x00 \x002\x000\x001\x007\x00 \x00M\x00i\x00c\x00r\x00o\x00s\x00o\x00f\x00t\x00 \x00C\x00o\x00r\x00p\x00o\x00r\x00a\x00t\x00i\x00o\x00n\x00\r\x00\n\x00*\x00*\x00*\x00*\x00*\x00*\x00*\x00*\x00*\x00*\x00*\x00*\x00*\x00*\x00*\x00*\x00*\x00*\x00*\x00*\x00*\x00*\x00*\x00*\x00*\x00*\x00*\x00*\x00*\x00*\x00*\x00*\x00*\x00*\x00*\x00*\x00*\x00*\x00*\x00*\x00*\x00*\x00*\x00*\x00*\x00*\x00*\x00*\x00*\x00*\x00*\x00*\x00*\x00*\x00*\x00*\x00*\x00*\x00*\x00*\x00*\x00*\x00*\x00*\x00*\x00*\x00*\x00*\x00*\x00*\x00\r\x00\n\x00The system cannot find the path specified.\r\nThe system cannot find the path specified.\r\nThe system cannot find the path specified.\r\n[\x00v\x00c\x00v\x00a\x00r\x00s\x00a\x00l\x00l\x00.\x00b\x00a\x00t\x00]\x00 \x00E\x00n\x00v\x00i\x00r\x00o\x00n\x00m\x00e\x00n\x00t\x00 \x00i\x00n\x00i\x00t\x00i\x00a\x00l\x00i\x00z\x00e\x00d\x00 \x00f\x00o\x00r\x00:\x00 \x00'\x00x\x008\x006\x00
\x00x\x006\x004\x00'\x00\r\x00\n\x00A\x00L\x00L\x00U\x00S\x00E\x00R\x00S\x00P\x00R\x00O\x00F\x00I\x00L\x00E\x00=\x00C\x00:\x00\\x00P\x00r\x00o\x00g\x00r\x00a\x00m\x00D\x00a\x00t\x00a\x00\r\x00\n\x00A\x00N\x00T\x00
\x00H\x00O\x00M\x00E\x00=\x00F\x00:\x00\\x00A\x00m\x00i\x00t\x00\\x00J\x00B\x00P\x00M\x006\x00I\x00n\x00s\x00t\x00a\x00l\x00l\x00\\x00a\x00p\x00a\x00c\x00h\x00e\x00-\x00a\x00n\x00t\x00-\x001\x00.\x009\x00.\x006\x00\r\x00\n\x00A\x00P\x00P\x00D\x00A\x00T\x00A\x00=\x00C\x00:\x00\\x00U\x00s\x00e\x00r\x00s\x00\\x00a\x00m\x00i\x00t\x00k\x00\\x00A\x00p\x00p\x00

Error: Error executing cmd /u /c "C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Auxiliary\Build\vcvarsall.bat" x86_amd64 && set

F:\Amit\download\coco-master\coco-master\PythonAPI>

from mask_rcnn.

yvesdu avatar yvesdu commented on May 19, 2024

Anybody ran into the same problem. Tried all the suggestions above.

Collecting pycocotools
Using cached https://files.pythonhosted.org/packages/96/84/9a07b1095fd8555ba3f3d519517c8743c2554a245f9476e5e39869f948d2/pycocotools-2.0.0.tar.gz
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "", line 1, in
File "/tmp/pip-build-895bapp3/pycocotools/setup.py", line 29, in
cythonize(ext_modules)
File "/home/yves/.local/lib/python3.6/site-packages/Cython/Build/Dependencies.py", line 958, in cythonize
ctx = c_options.create_context()
File "/home/yves/.local/lib/python3.6/site-packages/Cython/Compiler/Main.py", line 595, in create_context
self.cplus, self.language_level, options=self)
File "/home/yves/.local/lib/python3.6/site-packages/Cython/Compiler/Main.py", line 78, in init
from . import Builtin, CythonScope
File "/home/yves/.local/lib/python3.6/site-packages/Cython/Compiler/CythonScope.py", line 5, in
from .UtilityCode import CythonUtilityCode
File "/home/yves/.local/lib/python3.6/site-packages/Cython/Compiler/UtilityCode.py", line 3, in
from .TreeFragment import parse_from_strings, StringParseContext
File "/home/yves/.local/lib/python3.6/site-packages/Cython/Compiler/TreeFragment.py", line 17, in
from .Visitor import VisitorTransform
File "Cython/Compiler/Visitor.py", line 17, in init Cython.Compiler.Visitor
File "/home/yves/.local/lib/python3.6/site-packages/Cython/Compiler/ExprNodes.py", line 46, in
from .Pythran import (to_pythran, is_pythran_supported_type, is_pythran_supported_operation_type,
ImportError: cannot import name 'pythran_is_numpy_func_supported'

----------------------------------------

Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-895bapp3/pycocotools/

from mask_rcnn.

inakaaay avatar inakaaay commented on May 19, 2024

@philferriere when i tried to pip install git+https://github.com/philferriere/cocoapi.git#egg=pycocotools^&subdirectory=PythonAPI to my laptop, it occured an error saying that
Command "c:\users\lenovo-pc\appdata\local\programs\python\python35\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\LENOVO~1\\AppData\\Local\\Temp\\pip-req-build-dfxhz19t\\PythonAPI\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record C:\Users\LENOVO~1\AppData\Local\Temp\pip-record-1t627cck\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in C:\Users\LENOVO~1\AppData\Local\Temp\pip-req-build-dfxhz19t\PythonAPI

how can i fix this?

from mask_rcnn.

yerzhik avatar yerzhik commented on May 19, 2024

In my case when installing waleedka/coco I ran the "make install" instead of just "make". Then it wokred. So local installation requires some additional steps I guess

from mask_rcnn.

yustiks avatar yustiks commented on May 19, 2024

Hi all!
I tried to install by this command
"pip3 install git+https://github.com/waleedka/coco.git#subdirectory=PythonAPI"
and got the error:
"Python.h: Нет такого файла или каталога" - no such file or directory.
I tried to install
"sudo apt-get install python-dev",
but I have already it.
Any suggestions?

from mask_rcnn.

PrakharPrashantSingh avatar PrakharPrashantSingh commented on May 19, 2024

Hi I am having same problem i.e. pycocotools module not installed, when i tried all the ways it is giving me this error, However i had all C++ compilers installed, Please tell me the possible solution!
error

i removed and reinstalled 2015 compilers but still error is not going!.

Thanking You

from mask_rcnn.

Shanzaay avatar Shanzaay commented on May 19, 2024

@

git clone https://github.com/pdollar/coco.git

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

before doing above steps install cython

Oky so i clone the repo, then install the setup.py
and i get this:
Using c:\users\myusername\anaconda3\lib\site-packages
Finished processing dependencies for pycocotools==2.0

now what. what am i suppose to do next?

from mask_rcnn.

Shanzaay avatar Shanzaay commented on May 19, 2024

I am facing the same issue. Is cocoAPI not supported by Python 3?

from mask_rcnn.

BilalSaeedLM10 avatar BilalSaeedLM10 commented on May 19, 2024

after following your instructions, this is where I am at:

error: Unable to find vcvarsall.bat.

Any Ideas now ?

from mask_rcnn.

Shanzaay avatar Shanzaay commented on May 19, 2024

after following your instructions, this is where I am at:

error: Unable to find vcvarsall.bat.

Any Ideas now ?

Just download cocoAPI... You can find cocapi on github.

https://github.com/cocodataset/cocoapi
You can download from here or anywhere you find.

Then go to the directory of cocoapi where setup.py is. Then run the command
python setup.py build_ext --inplace

if you see an output like this its a success.
running build_ext
copying build\lib.win-amd64-3.7\pycocotools_mask.cp37-win_amd64.pyd - > pycocotools

from mask_rcnn.

BilalSaeedLM10 avatar BilalSaeedLM10 commented on May 19, 2024

after following your instructions, this is where I am at:

error: Unable to find vcvarsall.bat.
Any Ideas now ?

Just download cocoAPI... You can find cocapi on github.

https://github.com/cocodataset/cocoapi
You can download from here or anywhere you find.

Then go to the directory of cocoapi where setup.py is. Then run the command
python setup.py build_ext --inplace

if you see an output like this its a success.
running build_ext
copying build\lib.win-amd64-3.7\pycocotools_mask.cp37-win_amd64.pyd - > pycocotools

error: Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual C++ Build Tools": https://visualstudio.microsoft.com/downloads/

Is there another way :( ?

from mask_rcnn.

Shanzaay avatar Shanzaay commented on May 19, 2024

from mask_rcnn.

haoyamado avatar haoyamado commented on May 19, 2024

may just install pycocotools with using pip.
pip install pycocotools.
GREAT!

from mask_rcnn.

rickvisual avatar rickvisual commented on May 19, 2024

pip install pycocotools

from mask_rcnn.

MISSIVA20 avatar MISSIVA20 commented on May 19, 2024

apres avoir excuter cette cmd python setup.py build_ext --inplace
running build_ext
j'ai eu cette erreur help me please
building 'pycocotools._mask' extension
error: Unable to find vcvarsall.bat

from mask_rcnn.

MISSIVA20 avatar MISSIVA20 commented on May 19, 2024

Résolu en utilisant
https://github.com/cocodataset/cocoapi

Bonjour j'ai executer cette cmd python setup.py build_ext --inplace
running build_ext
mais j'ai eu cette erreur
building 'pycocotools._mask' extension
error: Unable to find vcvarsall.bat

from mask_rcnn.

MISSIVA20 avatar MISSIVA20 commented on May 19, 2024

Le moyen le plus simple que j'ai trouvé et cela a fonctionné pour moi sur Mac, Ubuntu et Windows:

pip3 install git+https://github.com/waleedka/coco.git#subdirectory=PythonAPI

Les étapes d'installation complètes que j'utilise avec conda sur Python 3.6 (testé cela sur Ubuntu 18.04 uniquement):

conda install cudatoolkit cudnn tensorflow-gpu keras cython opencv
pip install imgaug
pip install git+https://github.com/waleedka/coco.git#subdirectory=PythonAPI

i have error when i make this cmd "pip install git+https://github.com/waleedka/coco.git#subdirectory=PythonAPI" git+ not found
how can install git+

from mask_rcnn.

MISSIVA20 avatar MISSIVA20 commented on May 19, 2024

après avoir suivi vos instructions, voici où j'en suis:

erreur: impossible de trouver vcvarsall.bat.
Des idées maintenant?

Il suffit de télécharger cocoAPI ... Vous pouvez trouver des cocapi sur github.
https://github.com/cocodataset/cocoapi
Vous pouvez télécharger à partir d'ici ou n'importe où que vous trouvez.
Ensuite, allez dans le répertoire de cocoapi où se trouve setup.py. Exécutez ensuite la commande
python setup.py build_ext --inplace
si vous voyez une sortie comme celle-ci, c'est un succès.
exécution de la
copie de build_ext build \ lib.win-amd64-3.7 \ pycocotools_mask.cp37-win_amd64.pyd -> pycocotools

erreur: Microsoft Visual C ++ 14.0 est requis. Obtenez-le avec "Microsoft Visual C ++ Build Tools": https://visualstudio.microsoft.com/downloads/

Y a-t-il une autre façon :(?

do you found a solution i have same error

from mask_rcnn.

MISSIVA20 avatar MISSIVA20 commented on May 19, 2024

Clonage de https://github.com/waleedka/coco (qui est le fork @waleedka de l'API coco), puis exécution

python PythonAPI/setup.py build_ext install

j'ai eu cette erreur
installé pycocotools sur site-packages et résolu l'erreur d'importation.

raise ValueError(error_msg)

ValueError: 'pycocotools/_mask.pyx' doesn't match any files

from mask_rcnn.

osvadimos avatar osvadimos commented on May 19, 2024

git clone https://github.com/pdollar/coco.git

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

before doing above steps install cython

however, I'd use sudo with care. In my case it was not needed though.

from mask_rcnn.

sudonto avatar sudonto commented on May 19, 2024

git clone https://github.com/pdollar/coco.git

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

before doing above steps install cython

Thanks! Just in case you face "pycocotools/_mask.c:4:20: fatal error: Python.h: No such file or directory
compilation terminated.", please issue apt-get install python3.6-dev (according to [this])(cocodataset/cocoapi#180)

from mask_rcnn.

Ccaptainwang avatar Ccaptainwang commented on May 19, 2024

you can solve this issues by this way
pip install pycocotools

from mask_rcnn.

AnglZ2Close avatar AnglZ2Close commented on May 19, 2024

from mask_rcnn.

shoeb-howlader avatar shoeb-howlader commented on May 19, 2024

#For Windows
pip install pycocotools-windows==2.0.0.2

thanks, man. It works for me. windows users can use this command.

from mask_rcnn.

ajaykumarmizzou avatar ajaykumarmizzou commented on May 19, 2024

The package pycocotools requires cython and a C compiler to install correctly. You can also install pycocotools as follows:

* On Linux, run `pip install git+https://github.com/waleedka/cocoapi.git#egg=pycocotools&subdirectory=PythonAPI`

* On Windows, run `pip install git+https://github.com/philferriere/cocoapi.git#egg=pycocotools^&subdirectory=PythonAPI`

Worked for me, I guess CPython was not installed in my system.

from mask_rcnn.

bryanbocao avatar bryanbocao commented on May 19, 2024

git clone https://github.com/pdollar/coco.git

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

before doing above steps install cython

The following commands work for me in a conda environment on Ubuntu 18.04:

git clone https://github.com/pdollar/coco.git
cd PythonAPI
pip3 install Cython --install-option="--no-cython-compile"
python3 setup.py build_ext --inplace
sudo python3 setup.py install

from mask_rcnn.

PaulCahuana avatar PaulCahuana commented on May 19, 2024

In my case i have Windows and I just run the follow command:
pip install pycocotools-windows
:)

from mask_rcnn.

MlLearnerAkash avatar MlLearnerAkash commented on May 19, 2024

ok

from mask_rcnn.

rinnegann avatar rinnegann commented on May 19, 2024

@utahman Same, but with the command pip install "git+https://github.com/philferriere/cocoapi.git#egg=pycocotools&subdirectory=PythonAPI"

This command has worked for me and I'm using Linux Mint 21 as my os.

from mask_rcnn.

harshy105 avatar harshy105 commented on May 19, 2024

I am using miniconda3 and this command worked:
conda install -c conda-forge pycocotools

The alternative are also mentioned here:
https://anaconda.org/conda-forge/pycocotools

from mask_rcnn.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.