如何在 Ubuntu 20.04 上运行 Nvidia Isaac?

如何在 Ubuntu 20.04 上运行 Nvidia Isaac?

我知道他们的安装文档指出它仅支持 18.04,但仍可以在 20.04 上运行它吗?当我尝试通过打开以下内容安装依赖项时:

./install_dependencies.sh

脚本返回此失败:

 E: Unable to locate package libvpx5
 [ERROR] Failed to install packages - libvpx5 libtwolame-dev libtheora-bin libspeex1

在@ubfan1的建议下,我安装了libvpx6,但还是出现了这个错误E: Unable to locate package libvpx5。然后我改成了libvpx5libvpx6文件中install_dependencies.sh。现在出现了这个错误:

Using pip 22.0.4 from /home/dmitriy/.local/lib/python3.8/site-packages/pip (python 3.8)
ERROR: Could not find a version that satisfies the requirement tensorflow-gpu==1.15.0 (from versions: 2.2.0, 2.2.1, 2.2.2, 2.2.3, 2.3.0, 2.3.1, 2.3.2, 2.3.3, 2.3.4, 2.4.0, 2.4.1, 2.4.2, 2.4.3, 2.4.4, 2.5.0, 2.5.1, 2.5.2, 2.5.3, 2.6.0, 2.6.1, 2.6.2, 2.6.3, 2.7.0rc0, 2.7.0rc1, 2.7.0, 2.7.1, 2.8.0rc0, 2.8.0rc1, 2.8.0)
ERROR: No matching distribution found for tensorflow-gpu==1.15.0

在我尝试更改文件中的此行之后requirements.txt

tensorflow-gpu==1.15.0

tensorflow==2.8.0

之后我cmake通过安装sudo apt install cmake。但出现此错误:

The conflict is caused by:
    The user requested keras==2.3.1
    tensorflow 2.8.0 depends on keras<2.9 and >=2.8.0rc0

To fix this you could try to:
1. loosen the range of package versions you've specified
2. remove package versions to allow pip attempt to solve the dependency conflict

我在文件中更改了 keras 版本requirements.txt

keras==2.3.1

keras==2.8.0

然后我收到错误:

 -- Configuring incomplete, errors occurred!
  See also "/tmp/pip-install-cxnneqyj/onnx_1ec1fa5d6a8d47ca9cbff428da18c916/.setuptools-cmake-build/CMakeFiles/CMakeOutput.log".
  See also "/tmp/pip-install-cxnneqyj/onnx_1ec1fa5d6a8d47ca9cbff428da18c916/.setuptools-cmake-build/CMakeFiles/CMakeError.log".
  Traceback (most recent call last):
    File "<string>", line 2, in <module>
    File "<pip-setuptools-caller>", line 34, in <module>
    File "/tmp/pip-install-cxnneqyj/onnx_1ec1fa5d6a8d47ca9cbff428da18c916/setup.py", line 315, in <module>
      setuptools.setup(
    File "/home/dmitriy/.local/lib/python3.8/site-packages/setuptools/__init__.py", line 87, in setup
      return distutils.core.setup(**attrs)
    File "/home/dmitriy/.local/lib/python3.8/site-packages/setuptools/_distutils/core.py", line 148, in setup
      return run_commands(dist)
    File "/home/dmitriy/.local/lib/python3.8/site-packages/setuptools/_distutils/core.py", line 163, in run_commands
      dist.run_commands()
    File "/home/dmitriy/.local/lib/python3.8/site-packages/setuptools/_distutils/dist.py", line 967, in run_commands
      self.run_command(cmd)
    File "/home/dmitriy/.local/lib/python3.8/site-packages/setuptools/dist.py", line 1214, in run_command
      super().run_command(command)
    File "/home/dmitriy/.local/lib/python3.8/site-packages/setuptools/_distutils/dist.py", line 986, in run_command
      cmd_obj.run()
    File "/usr/lib/python3/dist-packages/wheel/bdist_wheel.py", line 223, in run
      self.run_command('build')
    File "/home/dmitriy/.local/lib/python3.8/site-packages/setuptools/_distutils/cmd.py", line 313, in run_command
      self.distribution.run_command(command)
    File "/home/dmitriy/.local/lib/python3.8/site-packages/setuptools/dist.py", line 1214, in run_command
      super().run_command(command)
    File "/home/dmitriy/.local/lib/python3.8/site-packages/setuptools/_distutils/dist.py", line 986, in run_command
      cmd_obj.run()
    File "/home/dmitriy/.local/lib/python3.8/site-packages/setuptools/_distutils/command/build.py", line 136, in run
      self.run_command(cmd_name)
    File "/home/dmitriy/.local/lib/python3.8/site-packages/setuptools/_distutils/cmd.py", line 313, in run_command
      self.distribution.run_command(command)
    File "/home/dmitriy/.local/lib/python3.8/site-packages/setuptools/dist.py", line 1214, in run_command
      super().run_command(command)
    File "/home/dmitriy/.local/lib/python3.8/site-packages/setuptools/_distutils/dist.py", line 986, in run_command
      cmd_obj.run()
    File "/tmp/pip-install-cxnneqyj/onnx_1ec1fa5d6a8d47ca9cbff428da18c916/setup.py", line 209, in run
      self.run_command('cmake_build')
    File "/home/dmitriy/.local/lib/python3.8/site-packages/setuptools/_distutils/cmd.py", line 313, in run_command
      self.distribution.run_command(command)
    File "/home/dmitriy/.local/lib/python3.8/site-packages/setuptools/dist.py", line 1214, in run_command
      super().run_command(command)
    File "/home/dmitriy/.local/lib/python3.8/site-packages/setuptools/_distutils/dist.py", line 986, in run_command
      cmd_obj.run()
    File "/tmp/pip-install-cxnneqyj/onnx_1ec1fa5d6a8d47ca9cbff428da18c916/setup.py", line 195, in run
      subprocess.check_call(cmake_args)
    File "/usr/lib/python3.8/subprocess.py", line 364, in check_call
      raise CalledProcessError(retcode, cmd)
  subprocess.CalledProcessError: Command '['/usr/bin/cmake', '-DPYTHON_INCLUDE_DIR=/usr/include/python3.8', '-DPYTHON_EXECUTABLE=/usr/bin/python3', '-DBUILD_ONNX_PYTHON=ON', '-DCMAKE_EXPORT_COMPILE_COMMANDS=ON', '-DONNX_NAMESPACE=onnx', '-DPY_EXT_SUFFIX=.cpython-38-x86_64-linux-gnu.so', '-DCMAKE_BUILD_TYPE=Release', '-DONNX_ML=1', '/tmp/pip-install-cxnneqyj/onnx_1ec1fa5d6a8d47ca9cbff428da18c916']' returned non-zero exit status 1.
  error: subprocess-exited-with-error
  
  × python setup.py bdist_wheel 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: /usr/bin/python3 -u -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"))
  '"'"''"'"''"'"' % ('"'"'/tmp/pip-install-cxnneqyj/onnx_1ec1fa5d6a8d47ca9cbff428da18c916/setup.py'"'"',), "<pip-setuptools-caller>", "exec"))' bdist_wheel -d /tmp/pip-wheel-i5wyi68e
  cwd: /tmp/pip-install-cxnneqyj/onnx_1ec1fa5d6a8d47ca9cbff428da18c916/
  Building wheel for onnx (setup.py) ... error
  ERROR: Failed building wheel for onnx
  Running setup.py clean for onnx
  Running command python setup.py clean

第二个错误

-- Configuring incomplete, errors occurred!
  See also "/tmp/pip-install-uou042w3/onnx_f2684108a6604e46b4d58ca7bca088b7/.setuptools-cmake-build/CMakeFiles/CMakeOutput.log".
  See also "/tmp/pip-install-uou042w3/onnx_f2684108a6604e46b4d58ca7bca088b7/.setuptools-cmake-build/CMakeFiles/CMakeError.log".
  Traceback (most recent call last):
    File "<string>", line 2, in <module>
    File "<pip-setuptools-caller>", line 34, in <module>
    File "/tmp/pip-install-uou042w3/onnx_f2684108a6604e46b4d58ca7bca088b7/setup.py", line 315, in <module>
      setuptools.setup(
    File "/home/dmitriy/.local/lib/python3.8/site-packages/setuptools/__init__.py", line 87, in setup
      return distutils.core.setup(**attrs)
    File "/home/dmitriy/.local/lib/python3.8/site-packages/setuptools/_distutils/core.py", line 148, in setup
      return run_commands(dist)
    File "/home/dmitriy/.local/lib/python3.8/site-packages/setuptools/_distutils/core.py", line 163, in run_commands
      dist.run_commands()
    File "/home/dmitriy/.local/lib/python3.8/site-packages/setuptools/_distutils/dist.py", line 967, in run_commands
      self.run_command(cmd)
    File "/home/dmitriy/.local/lib/python3.8/site-packages/setuptools/dist.py", line 1214, in run_command
      super().run_command(command)
    File "/home/dmitriy/.local/lib/python3.8/site-packages/setuptools/_distutils/dist.py", line 986, in run_command
      cmd_obj.run()
    File "/home/dmitriy/.local/lib/python3.8/site-packages/setuptools/command/install.py", line 68, in run
      return orig.install.run(self)
    File "/home/dmitriy/.local/lib/python3.8/site-packages/setuptools/_distutils/command/install.py", line 670, in run
      self.run_command('build')
    File "/home/dmitriy/.local/lib/python3.8/site-packages/setuptools/_distutils/cmd.py", line 313, in run_command
      self.distribution.run_command(command)
    File "/home/dmitriy/.local/lib/python3.8/site-packages/setuptools/dist.py", line 1214, in run_command
      super().run_command(command)
    File "/home/dmitriy/.local/lib/python3.8/site-packages/setuptools/_distutils/dist.py", line 986, in run_command
      cmd_obj.run()
    File "/home/dmitriy/.local/lib/python3.8/site-packages/setuptools/_distutils/command/build.py", line 136, in run
      self.run_command(cmd_name)
    File "/home/dmitriy/.local/lib/python3.8/site-packages/setuptools/_distutils/cmd.py", line 313, in run_command
      self.distribution.run_command(command)
    File "/home/dmitriy/.local/lib/python3.8/site-packages/setuptools/dist.py", line 1214, in run_command
      super().run_command(command)
    File "/home/dmitriy/.local/lib/python3.8/site-packages/setuptools/_distutils/dist.py", line 986, in run_command
      cmd_obj.run()
    File "/tmp/pip-install-uou042w3/onnx_f2684108a6604e46b4d58ca7bca088b7/setup.py", line 209, in run
      self.run_command('cmake_build')
    File "/home/dmitriy/.local/lib/python3.8/site-packages/setuptools/_distutils/cmd.py", line 313, in run_command
      self.distribution.run_command(command)
    File "/home/dmitriy/.local/lib/python3.8/site-packages/setuptools/dist.py", line 1214, in run_command
      super().run_command(command)
    File "/home/dmitriy/.local/lib/python3.8/site-packages/setuptools/_distutils/dist.py", line 986, in run_command
      cmd_obj.run()
    File "/tmp/pip-install-uou042w3/onnx_f2684108a6604e46b4d58ca7bca088b7/setup.py", line 195, in run
      subprocess.check_call(cmake_args)
    File "/usr/lib/python3.8/subprocess.py", line 364, in check_call
      raise CalledProcessError(retcode, cmd)
  subprocess.CalledProcessError: Command '['/usr/bin/cmake', '-DPYTHON_INCLUDE_DIR=/usr/include/python3.8', '-DPYTHON_EXECUTABLE=/usr/bin/python3', '-DBUILD_ONNX_PYTHON=ON', '-DCMAKE_EXPORT_COMPILE_COMMANDS=ON', '-DONNX_NAMESPACE=onnx', '-DPY_EXT_SUFFIX=.cpython-38-x86_64-linux-gnu.so', '-DCMAKE_BUILD_TYPE=Release', '-DONNX_ML=1', '/tmp/pip-install-uou042w3/onnx_f2684108a6604e46b4d58ca7bca088b7']' returned non-zero exit status 1.
  error: subprocess-exited-with-error
  
  × Running setup.py install for onnx 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: /usr/bin/python3 -u -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"))
  '"'"''"'"''"'"' % ('"'"'/tmp/pip-install-446qbri3/onnx_5a2c95655ead4090aa493849a53eb885/setup.py'"'"',), "<pip-setuptools-caller>", "exec"))' install --record /tmp/pip-record-6gso7uyj/install-record.txt --single-version-externally-managed --user --prefix= --compile --install-headers /home/dmitriy/.local/include/python3.8/onnx
  cwd: /tmp/pip-install-446qbri3/onnx_5a2c95655ead4090aa493849a53eb885/
  Running setup.py install for onnx ... error
error: legacy-install-failure

× Encountered error while trying to install package.
╰─> onnx

note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.

为了改进失败,我运行这个命令: sudo apt-get install protobuf-compiler libprotoc-dev最终 Installation Succeeded

答案1

为了改进失败,我运行这个命令:sudo apt-get install protobuf-compiler libprotoc-dev 并最终安装成功

相关内容