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

"pip install git+https://github.com/philferriere/cocoapi.git#subdirectory=PythonAPI" execution failed #3

Open
1261972163 opened this issue Apr 1, 2018 · 2 comments

Comments

@1261972163
Copy link

Hi,@Markjay
I run "pip install git+https://github.com/philferriere/cocoapi.git#subdirectory=PythonAPI", but
the command execution failed, and the following error message occurred at the end of execution.

Finished generating code
LINK : fatal error LNK1158: cannot run 'rc.exe'
error: command 'C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\x86_amd64\link.exe' failed with exit status 1158
Command "c:\users\12619\anaconda3\envs\tensorflow-cpu\python.exe -u -c "import setuptools, tokenize;file='C:\Users\12619\AppData\Local\Temp\pip-weuwij12-build\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\12619\AppData\Local\Temp\pip-x5_h_so2-record\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in C:\Users\12619\AppData\Local\Temp\pip-weuwij12-build\PythonAPI

Please help me find out what causes and how to correct it, thank you.

@markjay4k
Copy link
Owner

I think you don't have visual c++ build tools installed. make sure to install this as specified in the video and the pycocotools repo.

@farzadzare
Copy link

(MaskRCNN) C:\Users\10\Documents>pip install git+https://github.com/philferriere/cocoapi.git#subdirectory=PythonAPI
Collecting git+https://github.com/philferriere/cocoapi.git#subdirectory=PythonAPI
Cloning https://github.com/philferriere/cocoapi.git to c:\users\10\appdata\local\temp\pip-req-build-7kkgedyh
Building wheels for collected packages: pycocotools
Running setup.py bdist_wheel for pycocotools ... error
Complete output from command C:\Users\10\Anaconda3\envs\MaskRCNN\python.exe -u -c "import setuptools, tokenize;file='C:\Users\10\AppData\Local\Temp\pip-req-build-7kkgedyh\PythonAPI\setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" bdist_wheel -d C:\Users\10\AppData\Local\Temp\pip-wheel-77e2d46o --python-tag cp36:
running bdist_wheel
running build
running build_py
creating build
creating build\lib.win-amd64-3.6
creating 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
copying pycocotools_init_.py -> build\lib.win-amd64-3.6\pycocotools
running build_ext
building 'pycocotools._mask' extension
creating build\temp.win-amd64-3.6
creating build\temp.win-amd64-3.6\Release
creating build\temp.win-amd64-3.6\Release\pycocotools
creating build\temp.win-amd64-3.6\common
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin\x86_amd64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -IC:\Users\10\Anaconda3\envs\MaskRCNN\lib\site-packages\numpy\core\include -I../common -IC:\Users\10\Anaconda3\envs\MaskRCNN\include -IC:\Users\10\Anaconda3\envs\MaskRCNN\include /Tcpycocotools/_mask.c /Fobuild\temp.win-amd64-3.6\Release\pycocotools/_mask.obj
_mask.c
c:\users\10\anaconda3\envs\maskrcnn\include\pyconfig.h(59) : fatal error C1083: Cannot open include file: 'io.h': No such file or directory
error: command 'C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin\x86_amd64\cl.exe' failed with exit status 2

Failed building wheel for pycocotools Running setup.py clean for pycocotools
Complete output from command C:\Users\10\Anaconda3\envs\MaskRCNN\python.exe -u -c "import setuptools, tokenize;file='C:\Users\10\AppData\Local\Temp\pip-req-build-7kkgedyh\PythonAPI\setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" clean --all:
Traceback (most recent call last):
File "", line 1, in File "C:\Users\10\AppData\Local\Temp\pip-req-build-7kkgedyh\PythonAPI\setup.py", line 25, in
cythonize(ext_modules)
File "C:\Users\10\Anaconda3\envs\MaskRCNN\lib\site-packages\Cython\Build\Dependencies.py", line 897, in cythonize aliases=aliases)
File "C:\Users\10\Anaconda3\envs\MaskRCNN\lib\site-packages\Cython\Build\Dependencies.py", line 777, in create_extension_list for file in nonempty(sorted(extended_iglob(filepattern)), "'%s' doesn't match any files" % filepattern):
File "C:\Users\10\Anaconda3\envs\MaskRCNN\lib\site-packages\Cython\Build\Dependencies.py", line 102, in nonempty
raise ValueError(error_msg) ValueError: 'pycocotools/_mask.pyx' doesn't match any files

---------------------------------------- Failed cleaning build dir for pycocotools
Failed to build pycocotools
Installing collected packages: pycocotools Running setup.py install for pycocotools ... error
Complete output from command C:\Users\10\Anaconda3\envs\MaskRCNN\python.exe -u -c "import setuptools, tokenize;file='C:\Users\10\AppData\Local\Temp\pip-req-build-7kkgedyh\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\10\AppData\Local\Temp\pip-record-8p1uaost\install-record.txt --single-version-externally-managed --compile:
running install
running build running build_py
running build_ext
building 'pycocotools._mask' extension C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin\x86_amd64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -IC:\Users\10\Anaconda3\envs\MaskRCNN\lib\site-packages\numpy\core\include -I../common -IC:\Users\10\Anaconda3\envs\MaskRCNN\include -IC:\Users\10\Anaconda3\envs\MaskRCNN\include /Tcpycocotools/_mask.c /Fobuild\temp.win-amd64-3.6\Release\pycocotools/_mask.obj
_mask.c c:\users\10\anaconda3\envs\maskrcnn\include\pyconfig.h(59) : fatal error C1083: Cannot open include file: 'io.h': No such file or directory
error: command 'C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin\x86_amd64\cl.exe' failed with exit status 2
----------------------------------------
Command "C:\Users\10\Anaconda3\envs\MaskRCNN\python.exe -u -c "import setuptools, tokenize;file='C:\Users\10\AppData\Local\Temp\pip-req-build-7kkgedyh\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\10\AppData\Local\Temp\pip-record-8p1uaost\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in C:\Users\10\AppData\Local\Temp\pip-req-build-7kkgedyh\PythonAPI

hi i have this problem too

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

3 participants