pedropro / TACO

🌮 Trash Annotations in Context Dataset Toolkit

Home Page:http://tacodataset.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Update to Requirements section in ReadMe.md

glitchwizard opened this issue · comments

commented

In the Readme.md for this project, it calls for pip3 install git+https://github.com/philferriere/cocoapi.git#subdirectory=PythonAPI and I wasn't able to get it to work with just that command.

I continuously got this error:

pip3 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\c m\appdata\local\temp\pip-req-build-y7ldg9q5
  Running command git clone -q https://github.com/philferriere/cocoapi.git 'C:\Users\C M\AppData\Local\Temp\pip-req-build-y7ldg9q5'
Using legacy 'setup.py install' for pycocotools, since package 'wheel' is not installed.
Installing collected packages: pycocotools
                                                      Running setup.py install for pycocotools ... error
    ERROR: Command errored out with exit status 1:
     command: 'c:\users\c m\pycharmprojects\taco\venv\scripts\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\C M\\AppData\\Local\\Temp\\pip-req-build-y7ldg9q5\\PythonAPI\\setup.py'"'"'; __f
ile__='"'"'C:\\Users\\C M\\AppData\\Local\\Temp\\pip-req-build-y7ldg9q5\\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\C M\AppData\Local\Temp\pip-record-o7lt68yh\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\users\c m\pycharmprojects\taco\ve
nv\include\site\python3.8\pycocotools'
         cwd: C:\Users\C M\AppData\Local\Temp\pip-req-build-y7ldg9q5\PythonAPI
    Complete output (13 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
    building 'pycocotools._mask' extension
    error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/
    ----------------------------------------
ERROR: Command errored out with exit status 1: 'c:\users\c m\pycharmprojects\taco\venv\scripts\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\C M\\AppData\\Local\\Temp\\pip-req-build-y7ldg9
q5\\PythonAPI\\setup.py'"'"'; __file__='"'"'C:\\Users\\C M\\AppData\\Local\\Temp\\pip-req-build-y7ldg9q5\\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\C M\AppData\Local\Temp\pip-record-o7lt68yh\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\
users\c m\pycharmprojects\taco\venv\include\site\python3.8\pycocotools' Check the logs for full command output.

At first I followed the suggestion and went to https://visualstudio.microsoft.com/visual-cpp-build-tools/, but installing that continued to show the same error.

I stumbled on this How to install c++ build tools in a conda virtual environment for use with cython/setproctitle, and the suggestion of installing Microsoft Visual C++ 14.0 worked and I was able to get the CocoAPI to install.

I confirm this error happens, I had the same issue. I fixed it by following the steps suggested by [MissMasawi] on https://answers.microsoft.com/en-us/windows/forum/all/microsoft-visual-c-140/6f0726e2-6c32-4719-9fe5-aa68b5ad8e6d?page=2 after downloading approximately 6~8gb of files, as below:

Go to https://visualstudio.microsoft.com/downloads/ under Tools for Visual Studio 2019 download Build Tools for Visual Studio 2019 (~1MB download)
Run and under Workload select C++ Build Tools, then under Options select MSVC v142 - VS 2019 C++ x64/x86 build tools (v 14.26) & Windows 10 SDK (10.0.17763.0) only (selects newer versions if available)

a5782ce7-ae52-46e8-9333-9c2efd860547

I have identified other requirements to run the demo and detector notebooks, which are not explicitly mentioned:

jupyterlab
tensorflow
scipy
scikit-image
imgaug
pip
git

Also worth mentioning that graphviz must be installed when creating the conda environment. Installing it inside the enviroment using git on the terminal will not work.