IDEA-Research / 3D-deformable-attention

[ICCV 2023] Official implementation of the paper "DFA3D: 3D Deformable Attention For 2D-to-3D Feature Lifting"
Other
150 stars 2 forks source link

Question about running "bash setup.sh 0" #8

Closed lihaolin88 closed 1 year ago

lihaolin88 commented 1 year ago

Hello, this is amazing work! when I tried to set up the environment and install the package with "bash setup.sh 0", the system gives me an error report as shown below

`running install

running bdist_egg running egg_info writing dfa3D.egg-info/PKG-INFO writing dependency_links to dfa3D.egg-info/dependency_links.txt writing top-level names to dfa3D.egg-info/top_level.txt /home/haolin/anaconda3/lib/python3.8/site-packages/torch/utils/cpp_extension.py:476: UserWarning: Attempted to use ninja as the BuildExtension backend but we could not find ninja.. Falling back to using the slow distutils backend. warnings.warn(msg.format('we could not find ninja.')) reading manifest file 'dfa3D.egg-info/SOURCES.txt' writing manifest file 'dfa3D.egg-info/SOURCES.txt' installing library code to build/bdist.linux-x86_64/egg running install_lib running build_py running build_ext Traceback (most recent call last): File "setup.py", line 201, in setup( File "/home/haolin/anaconda3/lib/python3.8/site-packages/setuptools/init.py", line 153, in setup return distutils.core.setup(**attrs) File "/home/haolin/anaconda3/lib/python3.8/distutils/core.py", line 148, in setup dist.run_commands() File "/home/haolin/anaconda3/lib/python3.8/distutils/dist.py", line 966, in run_commands self.run_command(cmd) File "/home/haolin/anaconda3/lib/python3.8/distutils/dist.py", line 985, in run_command cmd_obj.run() File "/home/haolin/anaconda3/lib/python3.8/site-packages/setuptools/command/install.py", line 67, in run self.do_egg_install() File "/home/haolin/anaconda3/lib/python3.8/site-packages/setuptools/command/install.py", line 109, in do_egg_install self.run_command('bdist_egg') File "/home/haolin/anaconda3/lib/python3.8/distutils/cmd.py", line 313, in run_command self.distribution.run_command(command) File "/home/haolin/anaconda3/lib/python3.8/distutils/dist.py", line 985, in run_command cmd_obj.run() File "/home/haolin/anaconda3/lib/python3.8/site-packages/setuptools/command/bdist_egg.py", line 164, in run cmd = self.call_command('install_lib', warn_dir=0) File "/home/haolin/anaconda3/lib/python3.8/site-packages/setuptools/command/bdist_egg.py", line 150, in call_command self.run_command(cmdname) File "/home/haolin/anaconda3/lib/python3.8/distutils/cmd.py", line 313, in run_command self.distribution.run_command(command) File "/home/haolin/anaconda3/lib/python3.8/distutils/dist.py", line 985, in run_command cmd_obj.run() File "/home/haolin/anaconda3/lib/python3.8/site-packages/setuptools/command/install_lib.py", line 11, in run self.build() File "/home/haolin/anaconda3/lib/python3.8/distutils/command/install_lib.py", line 107, in build self.run_command('build_ext') File "/home/haolin/anaconda3/lib/python3.8/distutils/cmd.py", line 313, in run_command self.distribution.run_command(command) File "/home/haolin/anaconda3/lib/python3.8/distutils/dist.py", line 985, in run_command cmd_obj.run() File "/home/haolin/anaconda3/lib/python3.8/site-packages/setuptools/command/build_ext.py", line 79, in run _build_ext.run(self) File "/home/haolin/anaconda3/lib/python3.8/site-packages/Cython/Distutils/old_build_ext.py", line 186, in run _build_ext.build_ext.run(self) File "/home/haolin/anaconda3/lib/python3.8/distutils/command/build_ext.py", line 340, in run self.build_extensions() File "/home/haolin/anaconda3/lib/python3.8/site-packages/torch/utils/cpp_extension.py", line 499, in build_extensions _check_cuda_version(compiler_name, compiler_version) File "/home/haolin/anaconda3/lib/python3.8/site-packages/torch/utils/cpp_extension.py", line 383, in _check_cuda_version torch_cuda_version = packaging.version.parse(torch.version.cuda) File "/home/haolin/anaconda3/lib/python3.8/site-packages/pkg_resources/_vendor/packaging/version.py", line 56, in parse return Version(version) File "/home/haolin/anaconda3/lib/python3.8/site-packages/pkg_resources/_vendor/packaging/version.py", line 275, in init match = self._regex.search(version) TypeError: expected string or bytes-like object ` Thank you for your help!

lihaolin88 commented 1 year ago

I solved the problem, just to help people with the same problem; please check the version of your Python and Pytorch, different computers may have different settings; for me, python <=3.7 and torch vision <=1.13.1 will work.