mmdet>=2.20.0 windows py38 can't install beacause of pycocotools
See original GitHub issueThanks for your error report and we appreciate it a lot.
Checklist
- I have searched related issues but cannot get the expected help.
- I have read the FAQ documentation but cannot get the expected help.
- The bug has not been fixed in the latest version.
Describe the bug mmdet>=2.20.0 need pycocotools but not accept pycocotools-windows. And it’s hard for me to build a pycocotools from source code. But I try mmdet==2.19.1, which accept pycocotools-windows and it can be easy installed with py38. So I think it is easy to fix, and I’d like to trian with cpu, so I need mmdet>=2.21.0, So I hope to fix this bug.
Reproduction
- What command or script did you run?
pip install mmdet
pip install mmdet==
pip install mmdet==2.19.1(this one works, but not the latest version)
-
Did you make any modifications on the code or config? Did you understand what you have modified?no
-
What dataset did you use? no Environment
-
Please run
python mmdet/utils/collect_env.py
to collect necessary environment information and paste it here.
C:\Users\Administrator\miniconda3\envs\py38\python.exe: can’t open file ‘mmdet/utils/collect_env.py’: [Errno 2] No such file or directory
(beacause I use pip to install, not git)
3. You may add addition that may be helpful for locating the problem, such as
- How you installed PyTorch [e.g., pip, conda, source]
- Other environment variables that may be related (such as $PATH
, $LD_LIBRARY_PATH
, $PYTHONPATH
, etc.)
python3.8.12 mmcv1.4.5 torch1.8.1 no cuda no gpu
Error traceback
If applicable, paste the error trackback here.
(py38) PS C:\Users\Administrator> pip install mmdet==2.22.0 -i https://pypi.tuna.tsinghua.edu.cn/simple
Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple
Collecting mmdet==2.22.0
Downloading https://pypi.tuna.tsinghua.edu.cn/packages/66/61/0e03c564c04d3d84a2d4f6e218c1fa287e61955322dcaa943f66ec4fbae9/mmdet-2.22.0-py3-none-any.whl (1.3 MB)
|████████████████████████████████| 1.3 MB 544 kB/s
Requirement already satisfied: six in c:\users\administrator\miniconda3\envs\py38\lib\site-packages (from mmdet==2.22.0) (1.16.0)
Collecting pycocotools
Using cached https://pypi.tuna.tsinghua.edu.cn/packages/75/5c/ac61ea715d7a89ecc31c090753bde28810238225ca8b71778dfe3e6a68bc/pycocotools-2.0.4.tar.gz (106 kB)
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing wheel metadata ... done
Requirement already satisfied: matplotlib in c:\users\administrator\miniconda3\envs\py38\lib\site-packages (from mmdet==2.22.0) (3.5.1)
Requirement already satisfied: numpy in c:\users\administrator\miniconda3\envs\py38\lib\site-packages (from mmdet==2.22.0) (1.22.3)
Requirement already satisfied: terminaltables in c:\users\administrator\miniconda3\envs\py38\lib\site-packages (from mmdet==2.22.0) (3.1.10)
Requirement already satisfied: kiwisolver>=1.0.1 in c:\users\administrator\miniconda3\envs\py38\lib\site-packages (from matplotlib->mmdet==2.22.0) (1.3.2)
Requirement already satisfied: pyparsing>=2.2.1 in c:\users\administrator\miniconda3\envs\py38\lib\site-packages (from matplotlib->mmdet==2.22.0) (3.0.7)
Requirement already satisfied: fonttools>=4.22.0 in c:\users\administrator\miniconda3\envs\py38\lib\site-packages (from matplotlib->mmdet==2.22.0) (4.30.0)
Requirement already satisfied: packaging>=20.0 in c:\users\administrator\miniconda3\envs\py38\lib\site-packages (from matplotlib->mmdet==2.22.0) (21.3)
Requirement already satisfied: cycler>=0.10 in c:\users\administrator\miniconda3\envs\py38\lib\site-packages (from matplotlib->mmdet==2.22.0) (0.11.0)
Requirement already satisfied: python-dateutil>=2.7 in c:\users\administrator\miniconda3\envs\py38\lib\site-packages (from matplotlib->mmdet==2.22.0) (2.8.2)
Requirement already satisfied: pillow>=6.2.0 in c:\users\administrator\miniconda3\envs\py38\lib\site-packages (from matplotlib->mmdet==2.22.0) (9.0.1)
Building wheels for collected packages: pycocotools
Building wheel for pycocotools (PEP 517) ... error
ERROR: Command errored out with exit status 1:
command: 'C:\Users\Administrator\miniconda3\envs\py38\python.exe' 'C:\Users\Administrator\miniconda3\envs\py38\lib\site-packages\pip\_vendor\pep517\in_process\_in_process.py' build_wheel 'C:\Users\ADMINI~1\AppData\Local\Temp\tmprgehj4jg'
cwd: C:\Users\Administrator\AppData\Local\Temp\pip-install-skr_hg80\pycocotools_9e584a053ba44d929b7530e67949486d
Complete output (14 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
skipping 'pycocotools\_mask.c' Cython extension (up-to-date)
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
Failed to build pycocotools
ERROR: Could not build wheels for pycocotools which use PEP 517 and cannot be installed directly
Bug fix If you have already identified the reason, you can provide the information here. If you are willing to create a PR to fix it, please also leave a comment here and that would be much appreciated! The problem should be like this, change this line in file requirement/runtime.txt to
pycocotools; platform_system == "Linux"
pycocotools-windows; platform_system == "Windows"
Issue Analytics
- State:
- Created 2 years ago
- Comments:8
#7374 I have make this to PR.
Yes, using Windows and python3.8.12, if use python3.9, it won’t work because we don’t have a whl for py39