Thinklab-SJTU/Bench2DriveZoo

关于运行环境安装报错

Closed this issue · 4 comments

hi,感谢优质工作的开源,但在安装运行环境是遇到了各种问题,麻烦帮忙看看,严格安装安装指导步骤安装,最开始提示gcc g++版本不正确,后续升级后,出现以下报错:

nvcc -V:

Cuda compilation tools, release 11.1, V11.1.74

gcc --version
gcc (Ubuntu 9.4.0-1ubuntu1~16.04) 9.4.0

g++ --version
g++ (Ubuntu 9.4.0-1ubuntu1~16.04) 9.4.0

tomli 2.0.1 pypi_0 pypi
tomlkit 0.13.2 pypi_0 pypi
torch 2.4.0+cu118 pypi_0 pypi
torchaudio 2.4.0+cu118 pypi_0 pypi
torchmetrics 0.11.4 pypi_0 pypi
torchvision 0.19.0+cu118 pypi_0 pypi
pytest 8.3.2 pypi_0 pypi
pytest-cov 5.0.0 pypi_0 pypi
pytest-runner 6.0.1 pypi_0 pypi
python 3.8.19 hd12c33a_0_cpython https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge
python-dateutil 2.9.0.post0 pypi_0 pypi
python-json-logger 2.0.7 pypi_0 pypi
pytz

`Requirement already satisfied: pycparser in /home/CN/zizhang.wu/anaconda3/envs/b2d_zoo/lib/python3.8/site-packages (from cffi>=1.0.1->argon2-cffi-bindings->argon2-cffi>=21.1->jupyter-server<3,>=1.16.0->jupyterlab==3.,>=3.0.0->open3d->mmcv==0.0.1) (2.22)
Requirement already satisfied: arrow>=0.15.0 in /home/CN/zizhang.wu/anaconda3/envs/b2d_zoo/lib/python3.8/site-packages (from isoduration->jsonschema[format-nongpl]>=4.18.0->jupyter-events>=0.9.0->jupyter-server<3,>=1.16.0->jupyterlab==3.
,>=3.0.0->open3d->mmcv==0.0.1) (1.3.0)
Requirement already satisfied: types-python-dateutil>=2.8.10 in /home/CN/zizhang.wu/anaconda3/envs/b2d_zoo/lib/python3.8/site-packages (from arrow>=0.15.0->isoduration->jsonschema[format-nongpl]>=4.18.0->jupyter-events>=0.9.0->jupyter-server<3,>=1.16.0->jupyterlab==3.*,>=3.0.0->open3d->mmcv==0.0.1) (2.9.0.20240316)
Installing collected packages: mmcv
DEPRECATION: Legacy editable install of mmcv==0.0.1 from file:///SHANAS06/lang.peng/FSD/Bench2DriveZoo (setup.py develop) is deprecated. pip 25.0 will enforce this behaviour change. A possible replacement is to add a pyproject.toml or enable --use-pep517, and use setuptools >= 64. If the resulting installation is not behaving as expected, try using --config-settings editable_mode=compat. Please consult the setuptools documentation for more information. Discussion can be found at pypa/pip#11457
Running setup.py develop for mmcv
Running command python setup.py develop
running develop
running egg_info
creating mmcv.egg-info
writing mmcv.egg-info/PKG-INFO
writing dependency_links to mmcv.egg-info/dependency_links.txt
writing requirements to mmcv.egg-info/requires.txt
writing top-level names to mmcv.egg-info/top_level.txt
writing manifest file 'mmcv.egg-info/SOURCES.txt'
reading manifest file 'mmcv.egg-info/SOURCES.txt'
writing manifest file 'mmcv.egg-info/SOURCES.txt'
running build_ext
building 'mmcv._ext' extension
creating /SHANAS06/lang.peng/FSD/Bench2DriveZoo/build
creating /SHANAS06/lang.peng/FSD/Bench2DriveZoo/build/temp.linux-x86_64-cpython-38
creating /SHANAS06/lang.peng/FSD/Bench2DriveZoo/build/temp.linux-x86_64-cpython-38/mmcv
creating /SHANAS06/lang.peng/FSD/Bench2DriveZoo/build/temp.linux-x86_64-cpython-38/mmcv/ops
creating /SHANAS06/lang.peng/FSD/Bench2DriveZoo/build/temp.linux-x86_64-cpython-38/mmcv/ops/csrc
creating /SHANAS06/lang.peng/FSD/Bench2DriveZoo/build/temp.linux-x86_64-cpython-38/mmcv/ops/csrc/pytorch
creating /SHANAS06/lang.peng/FSD/Bench2DriveZoo/build/temp.linux-x86_64-cpython-38/mmcv/ops/csrc/pytorch/cpu
creating /SHANAS06/lang.peng/FSD/Bench2DriveZoo/build/temp.linux-x86_64-cpython-38/mmcv/ops/csrc/pytorch/cuda
/home/CN/zizhang.wu/anaconda3/envs/b2d_zoo/lib/python3.8/site-packages/setuptools/command/develop.py:42: EasyInstallDeprecationWarning: easy_install command is deprecated.
!!

        ********************************************************************************
        Please avoid running ``setup.py`` and ``easy_install``.
        Instead, use pypa/build, pypa/installer or other
        standards-based tools.

        See https://github.com/pypa/setuptools/issues/917 for details.
        ********************************************************************************

!!
  easy_install.initialize_options(self)
/home/CN/zizhang.wu/anaconda3/envs/b2d_zoo/lib/python3.8/site-packages/setuptools/_distutils/cmd.py:66: SetuptoolsDeprecationWarning: setup.py install is deprecated.
!!

        ********************************************************************************
        Please avoid running ``setup.py`` directly.
        Instead, use pypa/build, pypa/installer or other
        standards-based tools.

        See https://blog.ganssle.io/articles/2021/10/setup-py-deprecated.html for details.
        ********************************************************************************

!!
  self.initialize_options()
/home/CN/zizhang.wu/anaconda3/envs/b2d_zoo/lib/python3.8/site-packages/torch/utils/cpp_extension.py:414: UserWarning: The detected CUDA version (11.1) has a minor version mismatch with the version that was used to compile PyTorch (11.8). Most likely this shouldn't be a problem.
  warnings.warn(CUDA_MISMATCH_WARN.format(cuda_str_version, torch.version.cuda))
/home/CN/zizhang.wu/anaconda3/envs/b2d_zoo/lib/python3.8/site-packages/torch/utils/cpp_extension.py:1965: UserWarning: TORCH_CUDA_ARCH_LIST is not set, all archs for visible cards are included for compilation.
If this is not desired, please set os.environ['TORCH_CUDA_ARCH_LIST'].
  warnings.warn(
Traceback (most recent call last):
  File "<string>", line 2, in <module>
  File "<pip-setuptools-caller>", line 34, in <module>
  File "/SHANAS06/lang.peng/FSD/Bench2DriveZoo/setup.py", line 181, in <module>
    setup(
  File "/home/CN/zizhang.wu/anaconda3/envs/b2d_zoo/lib/python3.8/site-packages/setuptools/__init__.py", line 108, in setup
    return distutils.core.setup(**attrs)
  File "/home/CN/zizhang.wu/anaconda3/envs/b2d_zoo/lib/python3.8/site-packages/setuptools/_distutils/core.py", line 184, in setup
    return run_commands(dist)
  File "/home/CN/zizhang.wu/anaconda3/envs/b2d_zoo/lib/python3.8/site-packages/setuptools/_distutils/core.py", line 200, in run_commands
    dist.run_commands()
  File "/home/CN/zizhang.wu/anaconda3/envs/b2d_zoo/lib/python3.8/site-packages/setuptools/_distutils/dist.py", line 964, in run_commands
    self.run_command(cmd)
  File "/home/CN/zizhang.wu/anaconda3/envs/b2d_zoo/lib/python3.8/site-packages/setuptools/dist.py", line 945, in run_command
    super().run_command(command)
  File "/home/CN/zizhang.wu/anaconda3/envs/b2d_zoo/lib/python3.8/site-packages/setuptools/_distutils/dist.py", line 983, in run_command
    cmd_obj.run()
  File "/home/CN/zizhang.wu/anaconda3/envs/b2d_zoo/lib/python3.8/site-packages/setuptools/command/develop.py", line 36, in run
    self.install_for_development()
  File "/home/CN/zizhang.wu/anaconda3/envs/b2d_zoo/lib/python3.8/site-packages/setuptools/command/develop.py", line 113, in install_for_development
    self.run_command('build_ext')
  File "/home/CN/zizhang.wu/anaconda3/envs/b2d_zoo/lib/python3.8/site-packages/setuptools/_distutils/cmd.py", line 316, in run_command
    self.distribution.run_command(command)
  File "/home/CN/zizhang.wu/anaconda3/envs/b2d_zoo/lib/python3.8/site-packages/setuptools/dist.py", line 945, in run_command
    super().run_command(command)
  File "/home/CN/zizhang.wu/anaconda3/envs/b2d_zoo/lib/python3.8/site-packages/setuptools/_distutils/dist.py", line 983, in run_command
    cmd_obj.run()
  File "/home/CN/zizhang.wu/anaconda3/envs/b2d_zoo/lib/python3.8/site-packages/setuptools/command/build_ext.py", line 93, in run
    _build_ext.run(self)
  File "/home/CN/zizhang.wu/anaconda3/envs/b2d_zoo/lib/python3.8/site-packages/setuptools/_distutils/command/build_ext.py", line 359, in run
    self.build_extensions()
  File "/home/CN/zizhang.wu/anaconda3/envs/b2d_zoo/lib/python3.8/site-packages/torch/utils/cpp_extension.py", line 866, in build_extensions
    build_ext.build_extensions(self)
  File "/home/CN/zizhang.wu/anaconda3/envs/b2d_zoo/lib/python3.8/site-packages/setuptools/_distutils/command/build_ext.py", line 476, in build_extensions
    self._build_extensions_serial()
  File "/home/CN/zizhang.wu/anaconda3/envs/b2d_zoo/lib/python3.8/site-packages/setuptools/_distutils/command/build_ext.py", line 502, in _build_extensions_serial
    self.build_extension(ext)
  File "/home/CN/zizhang.wu/anaconda3/envs/b2d_zoo/lib/python3.8/site-packages/setuptools/command/build_ext.py", line 254, in build_extension
    _build_ext.build_extension(self, ext)
  File "/home/CN/zizhang.wu/anaconda3/envs/b2d_zoo/lib/python3.8/site-packages/Cython/Distutils/build_ext.py", line 135, in build_extension
    super(build_ext, self).build_extension(ext)
  File "/home/CN/zizhang.wu/anaconda3/envs/b2d_zoo/lib/python3.8/site-packages/setuptools/_distutils/command/build_ext.py", line 557, in build_extension
    objects = self.compiler.compile(
  File "/home/CN/zizhang.wu/anaconda3/envs/b2d_zoo/lib/python3.8/site-packages/torch/utils/cpp_extension.py", line 679, in unix_wrap_ninja_compile
    _write_ninja_file_and_compile_objects(
  File "/home/CN/zizhang.wu/anaconda3/envs/b2d_zoo/lib/python3.8/site-packages/torch/utils/cpp_extension.py", line 1765, in _write_ninja_file_and_compile_objects
    get_compiler_abi_compatibility_and_version(compiler)
  File "/home/CN/zizhang.wu/anaconda3/envs/b2d_zoo/lib/python3.8/site-packages/torch/utils/cpp_extension.py", line 358, in get_compiler_abi_compatibility_and_version
    if not check_compiler_ok_for_platform(compiler):
  File "/home/CN/zizhang.wu/anaconda3/envs/b2d_zoo/lib/python3.8/site-packages/torch/utils/cpp_extension.py", line 311, in check_compiler_ok_for_platform
    which = subprocess.check_output(['which', compiler], stderr=subprocess.STDOUT)
  File "/home/CN/zizhang.wu/anaconda3/envs/b2d_zoo/lib/python3.8/subprocess.py", line 415, in check_output
    return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
  File "/home/CN/zizhang.wu/anaconda3/envs/b2d_zoo/lib/python3.8/subprocess.py", line 516, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['which', 'c++']' returned non-zero exit status 1.
error: subprocess-exited-with-error

× python setup.py develop did not run successfully.
│ exit code: 1
╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip.
full command: /home/CN/zizhang.wu/anaconda3/envs/b2d_zoo/bin/python3.8 -c '
exec(compile('"'"''"'"''"'"'
# This is <pip-setuptools-caller> -- a caller that pip uses to run setup.py
#
# - It imports setuptools before invoking setup.py, to enable projects that directly
#   import from `distutils.core` to work with newer packaging standards.
# - It provides a clear error message when setuptools is not installed.
# - It sets `sys.argv[0]` to the underlying `setup.py`, when invoking `setup.py` so
#   setuptools doesn'"'"'t think the script is `-c`. This avoids the following warning:
#     manifest_maker: standard file '"'"'-c'"'"' not found".
# - It generates a shim setup.py, for handling setup.cfg-only projects.
import os, sys, tokenize

try:
    import setuptools
except ImportError as error:
    print(
        "ERROR: Can not execute `setup.py` since setuptools is not available in "
        "the build environment.",
        file=sys.stderr,
    )
    sys.exit(1)

__file__ = %r
sys.argv[0] = __file__

if os.path.exists(__file__):
    filename = __file__
    with tokenize.open(__file__) as f:
        setup_py_code = f.read()
else:
    filename = "<auto-generated setuptools caller>"
    setup_py_code = "from setuptools import setup; setup()"

exec(compile(setup_py_code, filename, "exec"))
'"'"''"'"''"'"' % ('"'"'/SHANAS06/lang.peng/FSD/Bench2DriveZoo/setup.py'"'"',), "<pip-setuptools-caller>", "exec"))' develop --no-deps
cwd: /SHANAS06/lang.peng/FSD/Bench2DriveZoo/

error: subprocess-exited-with-error

× python setup.py develop did not run successfully.
│ exit code: 1
╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip.`

Cuda version should be 11.8, not 11.1.

Cuda version should be 11.8, not 11.1.

请问,必须是cuda 11.8吗?别的版本都不可以吗?

Sure, we train uniad/vad using H800. Its version is at least 11.8 and above.

cuda11.7 gcc9.5.0 is alright on my computer.