distutils.errors.DistutilsPlatformError: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools"
duxuan11 opened this issue · 4 comments
`During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "interactive_demo.py", line 21, in
from inference.interact.fbrs_controller import FBRSController
File "C:\Users\ASUS\Desktop\xmen\XMem-main\inference\interact\fbrs_controller.py", line 2, in
from .fbrs.controller import InteractiveController
File "C:\Users\ASUS\Desktop\xmen\XMem-main\inference\interact\fbrs\controller.py", line 8, in
from ..fbrs.inference.predictors import get_predictor
File "C:\Users\ASUS\Desktop\xmen\XMem-main\inference\interact\fbrs\inference\predictors_init_.py", line 2, in
from .brs import InputBRSPredictor, FeatureBRSPredictor, HRNetFeatureBRSPredictor
File "C:\Users\ASUS\Desktop\xmen\XMem-main\inference\interact\fbrs\inference\predictors\brs.py", line 7, in
from ...model.is_hrnet_model import DistMapsHRNetModel
File "C:\Users\ASUS\Desktop\xmen\XMem-main\inference\interact\fbrs\model\is_hrnet_model.py", line 4, in
from .ops import DistMaps
File "C:\Users\ASUS\Desktop\xmen\XMem-main\inference\interact\fbrs\model\ops.py", line 6, in
from ..utils.cython import get_dist_maps
File "C:\Users\ASUS\Desktop\xmen\XMem-main\inference\interact\fbrs\utils\cython_init_.py", line 2, in
from .dist_maps import get_dist_maps
File "C:\Users\ASUS\Desktop\xmen\XMem-main\inference\interact\fbrs\utils\cython\dist_maps.py", line 3, in
from ._get_dist_maps import get_dist_maps
File "C:\software\anaconda3\envs\fbrs\lib\site-packages\pyximport_pyximport3.py", line 332, in create_module
raise exc.with_traceback(tb)
File "C:\software\anaconda3\envs\fbrs\lib\site-packages\pyximport_pyximport3.py", line 314, in create_module
so_path = build_module(spec.name, pyxfilename=spec.origin, pyxbuild_dir=self._pyxbuild_dir,
File "C:\software\anaconda3\envs\fbrs\lib\site-packages\pyximport_pyximport3.py", line 197, in build_module
so_path = pyxbuild.pyx_to_dll(pyxfilename, extension_mod,
File "C:\software\anaconda3\envs\fbrs\lib\site-packages\pyximport\pyxbuild.py", line 103, in pyx_to_dll
dist.run_commands()
File "C:\software\anaconda3\envs\fbrs\lib\site-packages\setuptools_distutils\dist.py", line 969, in run_commands
self.run_command(cmd)
File "C:\software\anaconda3\envs\fbrs\lib\site-packages\setuptools\dist.py", line 963, in run_command
super().run_command(command)
File "C:\software\anaconda3\envs\fbrs\lib\site-packages\setuptools_distutils\dist.py", line 988, in run_command
cmd_obj.run()
File "C:\software\anaconda3\envs\fbrs\lib\site-packages\setuptools_distutils\command\build_ext.py", line 345, in run
self.build_extensions()
File "C:\software\anaconda3\envs\fbrs\lib\site-packages\setuptools_distutils\command\build_ext.py", line 467, in build_extensions
self._build_extensions_serial()
File "C:\software\anaconda3\envs\fbrs\lib\site-packages\setuptools_distutils\command\build_ext.py", line 493, in _build_extensions_serial
self.build_extension(ext)
File "C:\software\anaconda3\envs\fbrs\lib\site-packages\Cython\Distutils\build_ext.py", line 135, in build_extension
super(build_ext, self).build_extension(ext)
File "C:\software\anaconda3\envs\fbrs\lib\site-packages\setuptools_distutils\command\build_ext.py", line 548, in build_extension
objects = self.compiler.compile(
File "C:\software\anaconda3\envs\fbrs\lib\site-packages\setuptools_distutils_msvccompiler.py", line 343, in compile
self.initialize()
File "C:\software\anaconda3\envs\fbrs\lib\site-packages\setuptools_distutils_msvccompiler.py", line 253, in initialize
vc_env = _get_vc_env(plat_spec)
File "C:\software\anaconda3\envs\fbrs\lib\site-packages\setuptools\msvc.py", line 233, in msvc14_get_vc_env
return _msvc14_get_vc_env(plat_spec)
File "C:\software\anaconda3\envs\fbrs\lib\site-packages\setuptools\msvc.py", line 198, in _msvc14_get_vc_env
raise distutils.errors.DistutilsPlatformError(
ImportError: Building module inference.interact.fbrs.utils.cython._get_dist_maps failed: ['distutils.errors.DistutilsPlatformError: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/\n']`
When I installed the environment, and Visual Studio 2022 has been installed on my computer, I have this problem when running the program, I have tested that there is no problem with FBRS alone, do you have any suggestions to help me solve this problem?
This error comes from the import so I am curious as to why f-BRS would work. Can you try just importing and narrowing down the problem?
I just did a fresh install of VS C++ build tools on Windows and it worked out of the box. See also hkchengrex/Cutie#8
See also hkchengrex/Cutie#33
Feel free to re-open if you have additional information.