Open Longfei-Zhou opened 4 years ago
ERROR: Command errored out with exit status 1: 'c:\python36\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\MANTHA~1\AppData\Local\Temp\pip-install-oxopzdjb\pycocotools\setup.py'"'"'; file='"'"'C:\Users\MANTHA~1\AppData\Local\Temp\pip-install-oxopzdjb\pycocotools\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\MANTHA~1\AppData\Local\Temp\pip-record-k9einb9q\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\python36\Include\pycocotools' Check the logs for full command output.
i am also getting similar kind of error can anyone fix it...?
I found this solution works for me. Try it.
pip install git+https://github.com/philferriere/cocoapi.git#subdirectory=PythonAPI
it's not working
If you are working in Conda, you can follow the below steps to be able to install, import and use this library quite smoothly.
On Windows, you must have the Visual C++ 2015 build tools on your path. If you don't, make sure to install them from here
### Enter the below in your Conda Command Prompt ###
# Create a new environment
conda create -n <envName>
# Activate the environment
conda activate <envName>
# Install cython
pip install cython
# Install git
conda install -c anaconda git
# Install pycocotools from this GitHub rep
pip install git+https://github.com/philferriere/cocoapi.git#egg=pycocotools^&subdirectory=PythonAPI
Additionally, I have recently written an entire post on exploring and manipulating the COCO dataset. Do have a look.
it's not working
did u find any solution?
If you are working in Conda, you can follow the below steps to be able to install, import and use this library quite smoothly.
### Enter the below in your Conda Command Prompt ### # Create a new environment conda create -n <envName> # Activate the environment conda activate <envName> # Install cython pip install cython # Install git conda install -c anaconda git # Install pycocotools from this GitHub rep pip install git+https://github.com/philferriere/cocoapi.git#egg=pycocotools^&subdirectory=PythonAPI
Additionally, I have recently written an entire post on exploring and manipulating the COCO dataset. Do have a look.
Above has to be installed before installing pycocotools:
On Windows, you must have the Visual C++ 2015 build tools on your path. If you don't, make sure to install them from here
If you are working in Conda, you can follow the below steps to be able to install, import and use this library quite smoothly.
### Enter the below in your Conda Command Prompt ### # Create a new environment conda create -n <envName> # Activate the environment conda activate <envName> # Install cython pip install cython # Install git conda install -c anaconda git # Install pycocotools from this GitHub rep pip install git+https://github.com/philferriere/cocoapi.git#egg=pycocotools^&subdirectory=PythonAPI
Additionally, I have recently written an entire post on exploring and manipulating the COCO dataset. Do have a look.
This has to be installed before installing pycocotools:
On Windows, you must have the Visual C++ 2015 build tools on your path. If you don't, make sure to install them from here
This solution works well and solved the problem. @Divjyot many Thanks
Working +1!
Any solution?
Has anyone solved this yet?
@yeshapatel356 @nikmace https://github.com/cocodataset/cocoapi/issues/393#issuecomment-773037508
Any solution?
Has anyone solved this yet?
try this matepip install pycocotools-windows
if you are using win platform
else
conda install cython
before
pip install git+https://github.com/philferriere/cocoapi.git#egg=pycocotools^&subdirectory=PythonAPI
@yassersouri
I keep getting an error when building pycocotools:
I use the same commands: conda install cython before pip install git+https://github.com/philferriere/cocoapi.git#egg=pycocotools^&subdirectory=PythonAPI
And followed multiple tutorials. But I keep getting the same problem over and over again.
Does anyone know how I can solve this?
I keep getting an error when building pycocotools:
I use the same commands: conda install cython before pip install git+https://github.com/philferriere/cocoapi.git#egg=pycocotools^&subdirectory=PythonAPI
And followed multiple tutorials. But I keep getting the same problem over and over again.
Does anyone know how I can solve this?
me too dude me too :(
I keep getting an error when building pycocotools: I use the same commands: conda install cython before pip install git+https://github.com/philferriere/cocoapi.git#egg=pycocotools^&subdirectory=PythonAPI And followed multiple tutorials. But I keep getting the same problem over and over again. Does anyone know how I can solve this?
me too dude me too :(
did u solve it?
@rozhix yes I think I install pycocotools with the command "pip install pycocotool-windows" and or download the whole file from internet and paste it into the folder where the environment and the site-packages are located.
Any solution?
Has anyone solved this yet?
try this mate
pip install pycocotools-windows
if you are using win platformelse
conda install cython
beforepip install git+https://github.com/philferriere/cocoapi.git#egg=pycocotools^&subdirectory=PythonAPI
@yassersouri
Heyyy, you saved my life! thanks!!
Hi everyone, previous methods don't work for me.
I solved with (on Windows 10 2H22)
conda install pycocotools -c conda-forge
Hi everyone, previous methods don't work for me.
I solved with (on Windows 10 2H22)
conda install pycocotools -c conda-forge
worked for me on win 11. I first installed cython then pycocotools and last tf-models-official
check if:
cython
installed gcc
installed You should try this first:
conda install pycocotools -c conda-forge
It works for me.
I meet this error when I run 'pip install pycocotools' on my win10. Could anyone help me?
Collecting pycocotools-fix Using cached pycocotools-fix-2.0.0.1.tar.gz (23 kB) Requirement already satisfied: setuptools>=18.0 in c:\users\longfei\appdata\local\programs\python\python38\lib\site-packages (from pycocotools-fix) (41.2.0) Requirement already satisfied: cython>=0.27.3 in c:\users\longfei\appdata\local\programs\python\python38\lib\site-packages (from pycocotools-fix) (0.29.15) Requirement already satisfied: matplotlib>=2.1.0 in c:\users\longfei\appdata\local\programs\python\python38\lib\site-packages (from pycocotools-fix) (3.2.1) Requirement already satisfied: pyparsing!=2.0.4,!=2.1.2,!=2.1.6,>=2.0.1 in c:\users\longfei\appdata\local\programs\python\python38\lib\site-packages (from matplotlib>=2.1.0->pycocotools-fix) (2.4.6) Requirement already satisfied: cycler>=0.10 in c:\users\longfei\appdata\local\programs\python\python38\lib\site-packages (from matplotlib>=2.1.0->pycocotools-fix) (0.10.0) Requirement already satisfied: numpy>=1.11 in c:\users\longfei\appdata\local\programs\python\python38\lib\site-packages (from matplotlib>=2.1.0->pycocotools-fix) (1.18.1) Requirement already satisfied: kiwisolver>=1.0.1 in c:\users\longfei\appdata\local\programs\python\python38\lib\site-packages (from matplotlib>=2.1.0->pycocotools-fix) (1.1.0) Requirement already satisfied: python-dateutil>=2.1 in c:\users\longfei\appdata\local\programs\python\python38\lib\site-packages (from matplotlib>=2.1.0->pycocotools-fix) (2.8.1) Requirement already satisfied: six in c:\users\longfei\appdata\local\programs\python\python38\lib\site-packages (from cycler>=0.10->matplotlib>=2.1.0->pycocotools-fix) (1.14.0) Building wheels for collected packages: pycocotools-fix Building wheel for pycocotools-fix (setup.py) ... error ERROR: Command errored out with exit status 1: command: 'c:\users\longfei\appdata\local\programs\python\python38\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\Longfei\AppData\Local\Temp\pip-install-tksjsr9a\pycocotools-fix\setup.py'"'"'; file='"'"'C:\Users\Longfei\AppData\Local\Temp\pip-install-tksjsr9a\pycocotools-fix\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\Longfei\AppData\Local\Temp\pip-wheel-iiq4ettu' cwd: C:\Users\Longfei\AppData\Local\Temp\pip-install-tksjsr9a\pycocotools-fix\ Complete output (22 lines): running bdist_wheel running build running build_py creating build creating build\lib.win-amd64-3.8 creating build\lib.win-amd64-3.8\pycocotools copying pycocotools\coco.py -> build\lib.win-amd64-3.8\pycocotools copying pycocotools\cocoeval.py -> build\lib.win-amd64-3.8\pycocotools copying pycocotools\mask.py -> build\lib.win-amd64-3.8\pycocotools copying pycocotools__init__.py -> build\lib.win-amd64-3.8\pycocotools running build_ext cythoning pycocotools/_mask.pyx to pycocotools_mask.c c:\users\longfei\appdata\local\programs\python\python38\lib\site-packages\Cython\Compiler\Main.py:369: FutureWarning: Cython directive 'language_level' not set, using 2 for now (Py2). This will change in a later release! File: C:\Users\Longfei\AppData\Local\Temp\pip-install-tksjsr9a\pycocotools-fix\pycocotools_mask.pyx tree = Parsing.p_module(s, pxd, full_module_name) building 'pycocotools._mask' extension creating build\temp.win-amd64-3.8 creating build\temp.win-amd64-3.8\Release creating build\temp.win-amd64-3.8\Release\common creating build\temp.win-amd64-3.8\Release\pycocotools C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.24.28314\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -Ic:\users\longfei\appdata\local\programs\python\python38\lib\site-packages\numpy\core\include -I./common -Ic:\users\longfei\appdata\local\programs\python\python38\include -Ic:\users\longfei\appdata\local\programs\python\python38\include "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.24.28314\ATLMFC\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.24.28314\include" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\cppwinrt" /Tc./common/maskApi.c /Fobuild\temp.win-amd64-3.8\Release./common/maskApi.obj -Wno-cpp -Wno-unused-function -std=c99 cl : Command line error D8021 : invalid numeric argument '/Wno-cpp' error: command 'C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.24.28314\bin\HostX86\x64\cl.exe' failed with exit status 2
ERROR: Failed building wheel for pycocotools-fix Running setup.py clean for pycocotools-fix Failed to build pycocotools-fix Installing collected packages: pycocotools-fix Running setup.py install for pycocotools-fix ... error ERROR: Command errored out with exit status 1: command: 'c:\users\longfei\appdata\local\programs\python\python38\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\Longfei\AppData\Local\Temp\pip-install-tksjsr9a\pycocotools-fix\setup.py'"'"'; file='"'"'C:\Users\Longfei\AppData\Local\Temp\pip-install-tksjsr9a\pycocotools-fix\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\Longfei\AppData\Local\Temp\pip-record-btf2a9yt\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\users\longfei\appdata\local\programs\python\python38\Include\pycocotools-fix' cwd: C:\Users\Longfei\AppData\Local\Temp\pip-install-tksjsr9a\pycocotools-fix\ Complete output (20 lines): running install running build running build_py creating build creating build\lib.win-amd64-3.8 creating build\lib.win-amd64-3.8\pycocotools copying pycocotools\coco.py -> build\lib.win-amd64-3.8\pycocotools copying pycocotools\cocoeval.py -> build\lib.win-amd64-3.8\pycocotools copying pycocotools\mask.py -> build\lib.win-amd64-3.8\pycocotools copying pycocotools__init__.py -> build\lib.win-amd64-3.8\pycocotools running build_ext skipping 'pycocotools_mask.c' Cython extension (up-to-date) building 'pycocotools._mask' extension creating build\temp.win-amd64-3.8 creating build\temp.win-amd64-3.8\Release creating build\temp.win-amd64-3.8\Release\common creating build\temp.win-amd64-3.8\Release\pycocotools C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.24.28314\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -Ic:\users\longfei\appdata\local\programs\python\python38\lib\site-packages\numpy\core\include -I./common -Ic:\users\longfei\appdata\local\programs\python\python38\include -Ic:\users\longfei\appdata\local\programs\python\python38\include "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.24.28314\ATLMFC\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.24.28314\include" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\cppwinrt" /Tc./common/maskApi.c /Fobuild\temp.win-amd64-3.8\Release./common/maskApi.obj -Wno-cpp -Wno-unused-function -std=c99 cl : Command line error D8021 : invalid numeric argument '/Wno-cpp' error: command 'C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.24.28314\bin\HostX86\x64\cl.exe' failed with exit status 2
ERROR: Command errored out with exit status 1: 'c:\users\longfei\appdata\local\programs\python\python38\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\Longfei\AppData\Local\Temp\pip-install-tksjsr9a\pycocotools-fix\setup.py'"'"'; file='"'"'C:\Users\Longfei\AppData\Local\Temp\pip-install-tksjsr9a\pycocotools-fix\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\Longfei\AppData\Local\Temp\pip-record-btf2a9yt\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\users\longfei\appdata\local\programs\python\python38\Include\pycocotools-fix' Check the logs for full command output.