BerkeleyAutomation / dex-net

Repository for reading the Dex-Net 2.0 HDF5 database of 3D objects, parallel-jaw grasps, and robust grasp metrics
https://berkeleyautomation.github.io/dex-net/code.html
Other
296 stars 97 forks source link

[libprotobuf FATAL google/protobuf/stubs/common.cc:61] #47

Closed science-code closed 4 years ago

science-code commented 5 years ago

Hello! When testing the (successful) installation I run into this issue with protobuf:

~/catkin_ws/src/dex-net$ sudo python setup.py test
running test
running egg_info
writing src/dex_net.egg-info/PKG-INFO
writing top-level names to src/dex_net.egg-info/top_level.txt
writing dependency_links to src/dex_net.egg-info/dependency_links.txt
writing requirements to src/dex_net.egg-info/requires.txt
reading manifest file 'src/dex_net.egg-info/SOURCES.txt'
writing manifest file 'src/dex_net.egg-info/SOURCES.txt'
running build_ext
WARNING:root:Failed to import geometry msgs in rigid_transformations.py.
WARNING:root:Failed to import ros dependencies in rigid_transforms.py
WARNING:root:autolab_core not installed as catkin package, RigidTransform ros methods will be unavailable
[libprotobuf FATAL google/protobuf/stubs/common.cc:61] This program requires version 3.7.0 of the Protocol Buffer runtime library, but the installed version is 2.6.1.  Please update your library.  If you compiled the program yourself, make sure that your headers are from the same version of Protocol Buffers as your link-time library.  (Version verification failed in "bazel-out/k8-opt/genfiles/tensorflow/core/framework/tensor_shape.pb.cc".)
terminate called after throwing an instance of 'google::protobuf::FatalException'
  what():  This program requires version 3.7.0 of the Protocol Buffer runtime library, but the installed version is 2.6.1.  Please update your library.  If you compiled the program yourself, make sure that your headers are from the same version of Protocol Buffers as your link-time library.  (Version verification failed in "bazel-out/k8-opt/genfiles/tensorflow/core/framework/tensor_shape.pb.cc".)
Aborted (core dumped)

System: Ubuntu 16.04

Checking for protobuf version:

~/catkin_ws/src/dex-net$ pip show protobuf
Name: protobuf
Version: 3.9.1
Summary: Protocol Buffers
Home-page: https://developers.google.com/protocol-buffers/
Author: None
Author-email: None
License: 3-Clause BSD License
Location: /usr/local/lib/python3.5/dist-packages
Requires: setuptools, six
Required-by: tensorflow, tensorflow-gpu, tensorboard
~/catkin_ws/src/dex-net$ sudo pip show protobuf
Name: protobuf
Version: 3.9.1
Summary: Protocol Buffers
Home-page: https://developers.google.com/protocol-buffers/
Author: None
Author-email: None
License: 3-Clause BSD License
Location: /usr/local/lib/python3.7/site-packages
Requires: setuptools, six
Required-by: tensorflow, tensorflow-gpu, tensorboard

Could anyone kindly suggest a solution? Thank you.

science-code commented 5 years ago

After ~/catkin_ws/src/dex-net$ python -m pip uninstall tensorflow-gpu when retry the setup test, I obtain this:

~/catkin_ws/src/dex-net$ sudo python2 setup.py test
running test
running egg_info
writing requirements to src/dex_net.egg-info/requires.txt
writing src/dex_net.egg-info/PKG-INFO
writing top-level names to src/dex_net.egg-info/top_level.txt
writing dependency_links to src/dex_net.egg-info/dependency_links.txt
reading manifest file 'src/dex_net.egg-info/SOURCES.txt'
writing manifest file 'src/dex_net.egg-info/SOURCES.txt'
running build_ext
WARNING:root:Failed to import geometry msgs in rigid_transformations.py.
WARNING:root:Failed to import ros dependencies in rigid_transforms.py
WARNING:root:autolab_core not installed as catkin package, RigidTransform ros methods will be unavailable
Traceback (most recent call last):
  File "setup.py", line 42, in <module>
    test_suite='test'
  File "/home/mihai/.local/lib/python2.7/site-packages/setuptools/__init__.py", line 145, in setup
    return distutils.core.setup(**attrs)
  File "/usr/lib/python2.7/distutils/core.py", line 151, in setup
    dist.run_commands()
  File "/usr/lib/python2.7/distutils/dist.py", line 953, in run_commands
    self.run_command(cmd)
  File "/usr/lib/python2.7/distutils/dist.py", line 972, in run_command
    cmd_obj.run()
  File "/home/mihai/.local/lib/python2.7/site-packages/setuptools/command/test.py", line 229, in run
    self.run_tests()
  File "/home/mihai/.local/lib/python2.7/site-packages/setuptools/command/test.py", line 251, in run_tests
    exit=False,
  File "/usr/lib/python2.7/unittest/main.py", line 94, in __init__
    self.parseArgs(argv)
  File "/usr/lib/python2.7/unittest/main.py", line 149, in parseArgs
    self.createTests()
  File "/usr/lib/python2.7/unittest/main.py", line 158, in createTests
    self.module)
  File "/usr/lib/python2.7/unittest/loader.py", line 130, in loadTestsFromNames
    suites = [self.loadTestsFromName(name, module) for name in names]
  File "/usr/lib/python2.7/unittest/loader.py", line 103, in loadTestsFromName
    return self.loadTestsFromModule(obj)
  File "/home/mihai/.local/lib/python2.7/site-packages/setuptools/command/test.py", line 55, in loadTestsFromModule
    tests.append(self.loadTestsFromName(submodule))
  File "/usr/lib/python2.7/unittest/loader.py", line 100, in loadTestsFromName
    parent, obj = obj, getattr(obj, part)
AttributeError: 'module' object has no attribute 'database_test'

This looks similar to https://github.com/BerkeleyAutomation/dex-net/issues/18, but installing the dependencies without sudo does not solve the problem.

jeffmahler commented 5 years ago

@science-code The second error is usually caused by a failed import. Can you try the following?

python2
>>> import dexnet

Please post the error back here and we can take a look.

science-code commented 4 years ago

Closing this issue, as it was probably due to a incorrect "sudo" during installation. Thank you for your receptivity, @jeffmahler !