WXinlong / SOLO

SOLO and SOLOv2 for instance segmentation, ECCV 2020 & NeurIPS 2020.
Other
1.69k stars 307 forks source link

AssertionError: MMCV==0.2.16 is used but incompatible. Please install mmcv>=1.2.4, <=1.4.0. #168

Open mathmax12 opened 3 years ago

mathmax12 commented 3 years ago

Thanks for the amazing work and code. I am trying to follow the setup instructions. When I run the inference_demo.py I got: AssertionError: MMCV==0.2.16 is used but incompatible. Please install mmcv>=1.2.4, <=1.4.0.

Any suggestions ?.

danielcrane commented 3 years ago

@mathmax12 Where is the AssertionError coming from? It looks like an mmdet-related error - do you already have another version of mmdet installed that could be interfering with the one included with this repo?

If so, maybe this could help: https://github.com/WXinlong/SOLO/blob/master/docs/INSTALL.md#using-multiple-mmdetection-versions

mathmax12 commented 3 years ago

@danielcrane Thanks for the info. The error comes from mmdet package. I tried different version but the issue persist.

`SOLO\demo>python inference_demo.py
Traceback (most recent call last):
  File "inference_demo.py", line 1, in <module>
    from mmdet.apis import init_detector, inference_detector, show_result_pyplot#, show_result_ins
  File "C:\Users\Segmentation\lib\site-packages\mmdet\__init__.py", line 25, in <module>
    f'MMCV=={mmcv.__version__} is used but incompatible. ' \
AssertionError: MMCV==0.2.16 is used but incompatible. Please install mmcv>=1.2.4, <=1.4.0.`
danielcrane commented 3 years ago

@mathmax12 mmdet is included in this repo, have you tried uninstalling all other versions of mmdet that you may have elsewhere (i.e. via pip), and just relying on the one in this repo? (no installation required, it's imported directly from the folder)

mathmax12 commented 3 years ago

@danielcrane I uninstall the mmdet When I rerun the pip install -v -e . I got this issue:

` File "C:\Users\bigtree.conda\envs\edge_for_solov2\lib\site-packages\torch\utils\cpp_extension.py", line 1529, in _run_ninja_build raise RuntimeError(message) RuntimeError: Error compiling objects for extension ERROR: Command errored out with exit status 1: 'C:\Users\bigtree.conda\envs\edge_for_solov2\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\bigtree\Documents\prototype\SOLO\setup.py'"'"'; file='"'"'C:\Users\bigtree\Documents\prototype\SOLO\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' develop --no-deps Check the logs for full command output. Exception information: Traceback (most recent call last): File "C:\Users\bigtree.conda\envs\edge_for_solov2\lib\site-packages\pip_internal\cli\base_command.py", line 189, in _main status = self.run(options, args) File "C:\Users\bigtree.conda\envs\edge_for_solov2\lib\site-packages\pip_internal\cli\req_command.py", line 178, in wrapper return func(self, options, args) File "C:\Users\bigtree.conda\envs\edge_for_solov2\lib\site-packages\pip_internal\commands\install.py", line 400, in run pycompile=options.compile, File "C:\Users\bigtree.conda\envs\edge_for_solov2\lib\site-packages\pip_internal\req__init.py", line 88, in install_given_reqs pycompile=pycompile, File "C:\Users\bigtree.conda\envs\edge_for_solov2\lib\site-packages\pip_internal\req\req_install.py", line 774, in install unpacked_source_directory=self.unpacked_source_directory, File "C:\Users\bigtree.conda\envs\edge_for_solov2\lib\site-packages\pip_internal\operations\install\editable_legacy.py", line 51, in install_editable cwd=unpacked_source_directory, File "C:\Users\bigtree.conda\envs\edge_for_solov2\lib\site-packages\pip_internal\utils\subprocess.py", line 258, in call_subprocess raise InstallationSubprocessError(proc.returncode, command_desc) pip._internal.exceptions.InstallationSubprocessError: Command errored out with exit status 1: 'C:\Users\bigtree.conda\envs\edge_for_solov2\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\bigtree\Documents\prototype\SOLO\setup.py'"'"'; file='"'"'C:\Users\bigtree\Documents\prototype\SOLO\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file__, '"'"'exec'"'"'))' develop --no-deps Check the logs for full command output. Removed build tracker: 'C:\Users\bigtree\AppData\Local\Temp\pip-req-tracker-8d5y3e83'

(edge_for_solov2) C:\Users\bigtree\Documents\prototype\SOLO>python inference_demo.py python: can't open file 'inference_demo.py': [Errno 2] No such file or directory`

danielcrane commented 3 years ago

Ah, unfortunately I've not installed it on Windows before, so I can't help much there I'm afraid.

mathmax12 commented 3 years ago

Thanks a lot anyway :)

9p15p commented 3 years ago

Please use pytorch1.4.0