-
Notifications
You must be signed in to change notification settings - Fork 3.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Failed building wheel for pycocotools - Windows 10 conda #169
Comments
I have the same problem! |
The maintainers won't provide support for Windows: #9 (comment) |
same problem! anyone have ideas how to solve it ? |
Sure sucks that pycocotools doesn't support windows |
It does work on windows. Here is the way to fix install it. |
That works! Thanks a lot bro |
This doesn't work for me sadly! I have VC 2017 could this be a problem? if not, any other ideas to solve this?
|
@m3m3-chan, You need to either reinstall your Python and visual studio or you may have to update the pip3. Looks like some of the components are missing in your root location. If it doesn't work out, use Google colab. Free from all the installation issues. |
It worked for me eventually, thanks @zbiswas3 !
|
@zbiswas3 I got the following error. Please help me out.
|
@siddas27 this type of error occurs when your pyhton installation or the visual studio installation has something missing from the path directory. Also updating pip3 may solve the problem. Check out @m3m3-chans post right before yours. Trying those may also help. In my case, j reinstalled pyhton, anaconda, and visual studio. I don't know exactly which one did the magic. I will update more if I can reproduce this error on my computer. |
Thanks you very much for solving this problem it had been an unsurmountable mountain to me God bless you |
You can skip the pycocotools by removing it from the requirements.txt ( if you have any such thing) Or you can check the README file of COCO Git repo https://github.com/cocodataset/cocoapi 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 pip install git+https://github.com/philferriere/cocoapi.git#subdirectory=PythonAPI |
thanks pal |
pip install "git+https://github.com/philferriere/cocoapi.git#egg=pycocotools&subdirectory=PythonAPI" |
@hariprasadr92 thanks bro! |
it took me a day to realize that the correct command for me is C:\WINDOWS\system32>pip install git+https://github.com/philferriere/cocoapi.git#subdirectory=PythonAPI |
Yeah. I am a student and I can always update to the latest version. Maybe if you are working on it for an enterprise application, it might be difficult to upgrade the version quickly. Anyways, hope you would have figured it out :) |
I came across this error, please help me out. I am using anaconda on a virtual environment
|
fatal error C1083: Cannot open include file: 'io.h': No such file or directory This sounds like you had issues with installation of Visual studio. You probably downloaded the wrong version or probably your system could not install all the required files. Make sure you have the Visual C++ 2015 build tools on your path. So please clean up all the clutters from your pc and reinstall the visual c++ 2015 build tool. |
Thank you very much for the solution, I installed Visual C++ 2015 Build Tools from https://go.microsoft.com/fwlink/?LinkId=691126 with default selection and ran the command and it gets installed successfully. Once again, thanks for your help. |
(tensorflow3) PS C:\Users\User> pip install "git+https://github.com/philferriere/cocoapi.git#egg=pycocotools&subdirectory=PythonAPI" |
@zbiswas3 you are my hero |
ni ye tai tmd cong ming le ba! |
@GitHongWu and @TonyFPY thanks it works for me too. |
Thanks. This is the only real solution that really works, instead of trying all these different packages and different version, u just have to install the Microsoft windows sdk and then a simple pip3 install pycocotools will work |
ERROR: detectron2 0.3+cu101 has requirement pycocotools>=2.0.2, but you'll have pycocotools 2.0 which is incompatible. how can i rectify this error |
It works for me. Thanks! There are two problems happened during process.
|
Thanks a lot Bro..It worked !! |
Mine got fixed!!! I used the VS2015 x64 Native Tools Command Prompt from the Start Menu and Pycotools was installed without a single error. Windows Command Prompt, Anaconda Command Prompt, nothing worked for me but this did. Anyone facing such issue even if VS2015 is installed should try to work it out this way |
pip install pycocotools-windows |
It did not worked for me |
None of the solutions of the solutions that kind strangers gave here worked for me. and I sh*t you not: |
I've solved the issue with this command:
|
|
Firstly, I'm not a CS person, I'm just someone who wants to use models as practitioner. Thanks for being understanding! ;) I'm trying to install tf-models-official on a PC with Windows 10. When I run pip install tf-models-official on the command prompt, I get the following error Building wheel for pycocotools (setup.py) ... error ERROR: Command errored out with exit status 1: command: 'C:\Users\iavta\anaconda3\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\iavta\AppData\Local\Temp\pip-install-0twx2hmy\pycocotools_ebdc747cefa04c81a8aab51eebf9fe53\setup.py'"'"'; file='"'"'C:\Users\iavta\AppData\Local\Temp\pip-install-0twx2hmy\pycocotools_ebdc747cefa04c81a8aab51eebf9fe53\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\iavta\AppData\Local\Temp\pip-wheel-60i3880o' cwd: C:\Users\iavta\AppData\Local\Temp\pip-install-0twx2hmy\pycocotools_ebdc747cefa04c81a8aab51eebf9fe53\ Complete output (16 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\iavta\anaconda3\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\iavta\AppData\Local\Temp\pip-install-0twx2hmy\pycocotools_ebdc747cefa04c81a8aab51eebf9fe53\pycocotools_mask.pyx tree = Parsing.p_module(s, pxd, full_module_name) 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: Failed building wheel for pycocotools Running setup.py clean for pycocotools Successfully built termcolor Failed to build pycocotools I've already done pip install pycocotools-windows and I had no problems whatsoever during installation, and according to Vision Studio Installer, I have Visual Studio 2019 version 16.11.3 already installed. So, I have no idea why they ask me for Microsoft Visual C++ 14.0 or greater. |
How it's not working for me please help |
I solved the annoying "failed building wheel for pycocotools" issue on windows 10 anaconda (python=3.9) by:
|
This works. Thank you. :) |
If using conda, a search on anaconda.org reveals that
|
This is my output installing through Anaconda |
Hello I am getting the following error. Please help me. I have installed the required C++ 2015 Build Tools. Also upgraded pip.
|
We also both have the same problem... my basetsd.h file is not found. Did u solve this? |
Thank you! Works in 2022 on Windows 10 |
I install visual studio then install visual studio build tools and my problem solved |
Using @Robotatron's answer, I tried
After downgrading my python version from v3.10 to v3.9, the following code ran successfully in my 'anaconda prompt' |
Thank you, it worked for me too. Context: I was trying to install Detectron2 (which needs pycocotools in turn) when I bumped into this error. |
I am using Conda to set up a virtual environment for pycocotools. Installing pycocotools with the command
pip install pycocotools
. Using python 3.5 and have already installed cythonThe text was updated successfully, but these errors were encountered: