EagerAI / fastai

R interface to fast.ai
https://eagerai.github.io/fastai/
Apache License 2.0
118 stars 13 forks source link

Error with pycocotools #118

Closed EngrStudent closed 3 years ago

EngrStudent commented 3 years ago

Please briefly describe your problem and what output you expect. I got the following error when trying to install the fastai package using r.

I think it wants to convince me to purchase Microsoft Visual C++ 14.0, but that is not in my budget. I'm still paying off my student loans. (@Michael Nikkhoo)

My command was: fastai::install_fastai(gpu = FALSE, cuda_version = '10.1', overwrite = FALSE)

There was a ton of text and then this error in the middle:

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
    skipping 'pycocotools\_mask.c' Cython extension (up-to-date)
    building 'pycocotools._mask' extension
    error: Microsoft Visual C++ 14.0 is required. Get it with "Build Tools for Visual Studio": https://visualstudio.microsoft.com/downloads/
    ----------------------------------------

Then it gave me this as the final result:

ERROR: Command errored out with exit status 1: 'C:\Users\<username>\AppData\Local\R-MINI~1\envs\R-RETI~1\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\<username>\\AppData\\Local\\Temp\\pip-install-hbabtz_i\\pycocotools_88fb2b1f63764ff4b73954ac6b86a7da\\setup.py'"'"'; __file__='"'"'C:\\Users\\<username>\\AppData\\Local\\Temp\\pip-install-hbabtz_i\\pycocotools_88fb2b1f63764ff4b73954ac6b86a7da\\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\<username>\AppData\Local\Temp\pip-record-64h7kl2e\install-record.txt' --single-version-externally-managed --compile --install-headers 'C:\Users\<username>\AppData\Local\R-MINI~1\envs\R-RETI~1\Include\pycocotools' Check the logs for full command output.
Error: Error installing package(s): "torch==1.7.0+cpu torchvision==0.8.1+cpu torchaudio===0.7.0 -f https://download.pytorch.org/whl/torch_stable.html", "IPython", "fastai==2.1.5", "pydicom", "kornia", "opencv-python", "scikit-image", "kaggle", "transformers", "timm", "fastinference[interp]", "ohmeow-blurr", "icevision[all]", "git+https://github.com/tcapelle/timeseries_fastai.git", "git+https://github.com/tmabraham/UPIT.git", "opencv-python-headless==4.4.0.46"

Of course, usernames have been changed to protect the innocent...

turgut090 commented 3 years ago

Could you try these answers and let me know, please? https://docs.microsoft.com/en-us/answers/questions/136595/error-microsoft-visual-c-140-or-greater-is-require.html

turgut090 commented 3 years ago

Please, reopen this issue if you still face this issue.