jin-s13 / xtcocoapi

Extended COCO-API
Other
63 stars 24 forks source link

pip install fails in conda in windows environment #10

Closed nikky4D closed 2 years ago

nikky4D commented 3 years ago

Computer: Win10, Package manager: Anaconda Python: 3.8

I did a pip install xtcocotools, and it keeps giving:

ERROR: Could not find a version that satisfies the requirement xtcocotools (from versions: none)
ERROR: No matching distribution found for xtcocotools

When I build from source by cloning the repo, and doing python setup.py install, I get:

running install
running bdist_egg
running egg_info
writing xtcocotools.egg-info\PKG-INFO
writing dependency_links to xtcocotools.egg-info\dependency_links.txt
writing requirements to xtcocotools.egg-info\requires.txt
writing top-level names to xtcocotools.egg-info\top_level.txt
reading manifest file 'xtcocotools.egg-info\SOURCES.txt'
writing manifest file 'xtcocotools.egg-info\SOURCES.txt'
installing library code to build\bdist.win-amd64\egg
running install_lib
running build_py
running build_ext
building 'xtcocotools._mask' extension
C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.28.29333\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -IC:\Users\nuzuegbunam\Anaconda3\envs\open-mmlab38\lib\site-packages\numpy\core\include -I./common -IC:\Users\nuzuegbunam\Anaconda3\envs\open-mmlab38\include -IC:\Users\nuzuegbunam\Anaconda3\envs\open-mmlab38\include "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.28.29333\include" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\include\um" "-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\\BuildTools\\VC\\Tools\\MSVC\\14.28.29333\\bin\\HostX86\\x64\\cl.exe' failed with exit status 2

Any help on this issue?

innerlee commented 3 years ago

https://github.com/cocodataset/cocoapi/issues/9

nikky4D commented 3 years ago

Thanks. Using the link, I removed the extra_compile_args=['-Wno-cpp', '-Wno-unused-function', '-std=c99'], then installed cython. That seems to work for the install.

Will the pip install be fixed soon?

lweingart commented 3 years ago

Hello guys,

Same problem here. pip install gives me the same:

pip install xtcocotools
ERROR: Could not find a version that satisfies the requirement xtcocotools (from versions: none)
ERROR: No matching distribution found for xtcocotools

and when trying to install from sources on macOS 11.0.1 with python 3.6 I get

python setup.py install
running install
running bdist_egg
running egg_info
creating xtcocotools.egg-info
writing xtcocotools.egg-info/PKG-INFO
writing dependency_links to xtcocotools.egg-info/dependency_links.txt
writing requirements to xtcocotools.egg-info/requires.txt
writing top-level names to xtcocotools.egg-info/top_level.txt
writing manifest file 'xtcocotools.egg-info/SOURCES.txt'
reading manifest file 'xtcocotools.egg-info/SOURCES.txt'
writing manifest file 'xtcocotools.egg-info/SOURCES.txt'
installing library code to build/bdist.macosx-10.9-x86_64/egg
running install_lib
running build_py
creating build
creating build/lib.macosx-10.9-x86_64-3.6
creating build/lib.macosx-10.9-x86_64-3.6/xtcocotools
copying xtcocotools/coco.py -> build/lib.macosx-10.9-x86_64-3.6/xtcocotools
copying xtcocotools/mask.py -> build/lib.macosx-10.9-x86_64-3.6/xtcocotools
copying xtcocotools/__init__.py -> build/lib.macosx-10.9-x86_64-3.6/xtcocotools
copying xtcocotools/cocoeval.py -> build/lib.macosx-10.9-x86_64-3.6/xtcocotools
running build_ext
building 'xtcocotools._mask' extension
creating build/temp.macosx-10.9-x86_64-3.6
creating build/temp.macosx-10.9-x86_64-3.6/common
creating build/temp.macosx-10.9-x86_64-3.6/xtcocotools
gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -arch x86_64 -g -I/Users/lweingart/.virtualenvs/droning_micr/lib/python3.6/site-packages/numpy/core/include -I./common -I/Library/Frameworks/Python.framework/Versions/3.6/include/python3.6m -c ./common/maskApi.c -o build/temp.macosx-10.9-x86_64-3.6/./common/maskApi.o -Wno-cpp -Wno-unused-function -std=c99
gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -arch x86_64 -g -I/Users/lweingart/.virtualenvs/droning_micr/lib/python3.6/site-packages/numpy/core/include -I./common -I/Library/Frameworks/Python.framework/Versions/3.6/include/python3.6m -c xtcocotools/_mask.c -o build/temp.macosx-10.9-x86_64-3.6/xtcocotools/_mask.o -Wno-cpp -Wno-unused-function -std=c99
clang: error: no such file or directory: 'xtcocotools/_mask.c'
clang: error: no input files
error: command 'gcc' failed with exit status 1

Thank you for your help

Laurent

nikky4D commented 3 years ago

Do you have cython installed for your system? I had similar issues in my install.

lweingart commented 3 years ago

Thank you @nikky4D ,

I installed cython and then was indeed able to install from source successfully. Thanks again

Laurent

jin-s13 commented 2 years ago

fixed in v1.11.