(tfpose) C:UsersdharmaDesktoptf-openpose>pip3 install pycocotools
Collecting pycocotools
Using cached https://files.pythonhosted.org/packages/96/84/9a07b1095fd8555ba3f3d519517c8743c2554a245f9476e5e39869f948d2/pycocotools-2.0.0.tar.gz
ERROR: Complete output from command python setup.py egg_info:
ERROR: Traceback (most recent call last):
File "
File "C:UsersdharmaAppDataLocalTemppip-install-s7qbge4mpycocotoolssetup.py", line 2, in
from Cython.Build import cythonize
ModuleNotFoundError: No module named 'Cython'
----------------------------------------
ERROR: Command "python setup.py egg_info" failed with error code 1 in C:UsersdharmaAppDataLocalTemppip-install-s7qbge4mpycocotools
(tfpose) C:\Users\dharma\Desktop\tf-openpose>pip3 install pycocotools
Collecting pycocotools
Using cached https://files.pythonhosted.org/packages/96/84/9a07b1095fd8555ba3f3d519517c8743c2554a245f9476e5e39869f948d2/pycocotools-2.0.0.tar.gz
Building wheels for collected packages: pycocotools
Building wheel for pycocotools (setup.py) ... error
ERROR: Complete output from command 'c:\users\dharma\desktop\tf-openpose\tfpose\scripts\python.exe' -u -c 'import setuptools, tokenize;__file__='"'"'C:\Users\dharma\AppData\Local\Temp\pip-install-t0xhj1a7\pycocotools\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\dharma\AppData\Local\Temp\pip-wheel-81vk9qru' --python-tag cp36:
ERROR: 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\Release\common
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.20.27508\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -Ic:\users\dharma\desktop\tf-openpose\tfpose\lib\site-packages\numpy\core\include -Icommon -Ic:\users\dharma\appdata\local\programs\python\python36\include -Ic:\users\dharma\appdata\local\programs\python\python36\include "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.20.27508\ATLMFC\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.20.27508\include" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\cppwinrt" /Tcpycocotools/_mask.c /Fobuild\temp.win-amd64-3.6\Release\pycocotools/_mask.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.20.27508\bin\HostX86\x64\cl.exe' failed with exit status 2
ERROR: Failed building wheel for pycocotools
Running setup.py clean for pycocotools
Failed to build pycocotools
Installing collected packages: pycocotools
Running setup.py install for pycocotools ... error
ERROR: Complete output from command 'c:\users\dharma\desktop\tf-openpose\tfpose\scripts\python.exe' -u -c 'import setuptools, tokenize;__file__='"'"'C:\Users\dharma\AppData\Local\Temp\pip-install-t0xhj1a7\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\dharma\AppData\Local\Temp\pip-record-6iworebn\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\users\dharma\desktop\tf-openpose\tfpose\include\site\python3.6\pycocotools':
ERROR: 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\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\Release\common
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.20.27508\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -Ic:\users\dharma\desktop\tf-openpose\tfpose\lib\site-packages\numpy\core\include -Icommon -Ic:\users\dharma\appdata\local\programs\python\python36\include -Ic:\users\dharma\appdata\local\programs\python\python36\include "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.20.27508\ATLMFC\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.20.27508\include" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\cppwinrt" /Tcpycocotools/_mask.c /Fobuild\temp.win-amd64-3.6\Release\pycocotools/_mask.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.20.27508\bin\HostX86\x64\cl.exe' failed with exit status 2
----------------------------------------
ERROR: Command "'c:\users\dharma\desktop\tf-openpose\tfpose\scripts\python.exe' -u -c 'import setuptools, tokenize;__file__='"'"'C:\Users\dharma\AppData\Local\Temp\pip-install-t0xhj1a7\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\dharma\AppData\Local\Temp\pip-record-6iworebn\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\users\dharma\desktop\tf-openpose\tfpose\include\site\python3.6\pycocotools'" failed with error code 1 in C:\Users\dharma\AppData\Local\Temp\pip-install-t0xhj1a7\pycocotools\
@roopahtshree You need to run pip3 install Cython before.
hi roopahtshree,
To resolve above issue you need to follow below steps.
step 1: While executing requirements.txt file remove pycocotools and proceed with rest of the installation.
step 2: Run command -> pip install --upgrade cython
step 3: Use this link to clone the recent coco module: https://github.com/philferriere/cocoapi
(git clone https://github.com/philferriere/cocoapi )
step 4: cd cocoapi/PythonAPI/
step 5: python setup.py install
thanks,
mayank
hi roopahtshree,
To resolve above issue you need to follow below steps.
step 1: While executing requirements.txt file remove pycocotools and proceed with rest of the installation.
step 2: Run command -> pip install --upgrade cython
step 3: Use this link to clone the recent coco module: https://github.com/philferriere/cocoapi
(git clone https://github.com/philferriere/cocoapi )step 4: cd cocoapi/PythonAPI/
step 5: python setup.py installthanks,
mayank
Searched a lot on this but nothing worked. Your solution worked like a charm ! Thanks a lot.
sorry bro @143mayank , can you explain the first step ?
hi roopahtshree,
To resolve above issue you need to follow below steps.
step 1: While executing requirements.txt file remove pycocotools and proceed with rest of the installation.
step 2: Run command -> pip install --upgrade cython
step 3: Use this link to clone the recent coco module: https://github.com/philferriere/cocoapi
(git clone https://github.com/philferriere/cocoapi )step 4: cd cocoapi/PythonAPI/
step 5: python setup.py installthanks,
mayank
adding to @143mayank 's answer, if someone is still getting error then do step 3.5: sudo apt install libc6-dev. It solved mine issue related to limits.h file not found error.
sorry bro @143mayank , can you explain the first step ?
@AHMEDSABER097
put the following lines into file name requirements.txt
dill
fire
matplotlib
numba
psutil
requests
scikit-image
scipy
slidingwindow
tqdm
git+https://github.com/ppwwyyxx/tensorpack.git
and then run command pip install -r requirements.txt
Hi @143mayank , could you please let me know the exact location of the requirements.txt file?
set DISTUTILS_USE_SDK=1
(tfpose) C:\Users\dharma\Desktop\tf-openpose>pip3 install pycocotools
Collecting pycocotools
Using cached https://files.pythonhosted.org/packages/96/84/9a07b1095fd8555ba3f3d519517c8743c2554a245f9476e5e39869f948d2/pycocotools-2.0.0.tar.gz
Building wheels for collected packages: pycocotools
Building wheel for pycocotools (setup.py) ... error
ERROR: Complete output from command 'c:\users\dharma\desktop\tf-openpose\tfpose\scripts\python.exe' -u -c 'import setuptools, tokenize;file='"'"'C:\Users\dharma\AppData\Local\Temp\pip-install-t0xhj1a7\pycocotools\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\dharma\AppData\Local\Temp\pip-wheel-81vk9qru' --python-tag cp36:
ERROR: 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\Release\common
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.20.27508\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -Ic:\users\dharma\desktop\tf-openpose\tfpose\lib\site-packages\numpy\core\include -Icommon -Ic:\users\dharma\appdata\local\programs\python\python36\include -Ic:\users\dharma\appdata\local\programs\python\python36\include "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.20.27508\ATLMFC\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.20.27508\include" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\cppwinrt" /Tcpycocotools/_mask.c /Fobuild\temp.win-amd64-3.6\Release\pycocotools/_mask.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.20.27508\bin\HostX86\x64\cl.exe' failed with exit status 2
ERROR: Failed building wheel for pycocotools
Running setup.py clean for pycocotools
Failed to build pycocotools
Installing collected packages: pycocotools
Running setup.py install for pycocotools ... error
ERROR: Complete output from command 'c:\users\dharma\desktop\tf-openpose\tfpose\scripts\python.exe' -u -c 'import setuptools, tokenize;file='"'"'C:\Users\dharma\AppData\Local\Temp\pip-install-t0xhj1a7\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\dharma\AppData\Local\Temp\pip-record-6iworebn\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\users\dharma\desktop\tf-openpose\tfpose\include\site\python3.6\pycocotools':
ERROR: 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\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\Release\common
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.20.27508\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -Ic:\users\dharma\desktop\tf-openpose\tfpose\lib\site-packages\numpy\core\include -Icommon -Ic:\users\dharma\appdata\local\programs\python\python36\include -Ic:\users\dharma\appdata\local\programs\python\python36\include "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.20.27508\ATLMFC\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.20.27508\include" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\cppwinrt" /Tcpycocotools/_mask.c /Fobuild\temp.win-amd64-3.6\Release\pycocotools/_mask.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.20.27508\bin\HostX86\x64\cl.exe' failed with exit status 2
ERROR: Command "'c:\users\dharma\desktop\tf-openpose\tfpose\scripts\python.exe' -u -c 'import setuptools, tokenize;file='"'"'C:\Users\dharma\AppData\Local\Temp\pip-install-t0xhj1a7\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\dharma\AppData\Local\Temp\pip-record-6iworebn\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\users\dharma\desktop\tf-openpose\tfpose\include\site\python3.6\pycocotools'" failed with error code 1 in C:\Users\dharma\AppData\Local\Temp\pip-install-t0xhj1a7\pycocotools\
Hai, follow the below steps to install pycocotools, this method will work for sure.
This process will sort the error for, let me know if you face any error.
running install
running build
running build_py
running build_ext
building 'pycocotools._mask' extension
error: Unable to find vcvarsall.bat
C:UserskiranDesktopwindows_v1.8.0cocoapi-masterPythonAPI>python setup.py install
running install
running build
running build_py
running build_ext
building 'pycocotools._mask' extension
C:Program Files (x86)Microsoft Visual Studio2019CommunityVCToolsMSVC14.25.28610binHostX86x64cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -IC:Userskirananaconda3libsite-packagesnumpycoreinclude -I../common -IC:Userskirananaconda3include -IC:Userskirananaconda3include "-IC:Program Files (x86)Microsoft Visual Studio2019CommunityVCToolsMSVC14.25.28610include" /Tcpycocotools/_mask.c /Fobuildtemp.win-amd64-3.7Releasepycocotools/_mask.obj
_mask.c
C:Userskirananaconda3includepyconfig.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\2019\Community\VC\Tools\MSVC\14.25.28610\bin\HostX86\x64\cl.exe' failed with exit status 2
i had solve this problem by installing visual studio build tools
download link
http://go.microsoft.com/fwlink/?LinkId=691126
How to deal with the pain of “unable to find vcvarsall.bat”
https://devblogs.microsoft.com/python/unable-to-find-vcvarsall-bat/
To install and compile to your anaconda/python site-packages, simply run:
$ pip install git+https://github.com/philferriere/cocoapi.git#subdirectory=PythonAPI
Note that the original compile flags below are GCC flags unsupported by the Visual C++ 2015 build tools.
They can safely be removed.
Most helpful comment
hi roopahtshree,
To resolve above issue you need to follow below steps.
step 1: While executing requirements.txt file remove pycocotools and proceed with rest of the installation.
step 2: Run command -> pip install --upgrade cython
step 3: Use this link to clone the recent coco module: https://github.com/philferriere/cocoapi
(git clone https://github.com/philferriere/cocoapi )
step 4: cd cocoapi/PythonAPI/
step 5: python setup.py install
thanks,
mayank