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

WARNING:root:Failed to import mayavi #39

Open EvanLavizadeh opened 5 years ago

EvanLavizadeh commented 5 years ago

Hello!

When running the CLI, I get a bunch of import errors

WARNING:root:autolab_core not installed as catkin package, RigidTransform ros methods will be unavailable
WARNING:root:autolab_perception is not installed as a catkin package - ROS msg conversions will not be available for image wrappers
WARNING:root:Unable to import CNN modules! Likely due to missing tensorflow.
WARNING:root:TensorFlow can be installed following the instructions in https://www.tensorflow.org/get_started/os_setup
WARNING:root:Unable to import pylibfreenect2. Python-only Kinect driver may not work properly.
WARNING:root:Failed to import ROS in Kinect2_sensor.py. Kinect will not be able to be used in bridged mode
WARNING:root:Unable to import openni2 driver. Python-only Primesense driver may not work properly
WARNING:root:primesense_sensor.py not installed as catkin package. ROS functionality not available.
WARNING:root:Unable to import pyrealsense2.
WARNING:root:realsense_sensor.py not installed as catkin package. ROS functionality not available.
WARNING:root:Failed to import ROS in ensenso_sensor.py. ROS functionality not available
WARNING:root:Failed to import ROS in phoxi_sensor.py. PhoXiSensor functionality unavailable.
WARNING:root:Failed to import gqcnn! Grasp2D functions will not be available.
WARNING:root:Failed to import mayavi
WARNING:root:Failed to import pyhull
WARNING:root:Failed to import mayavi
WARNING:root:Failed to import mayavi
WARNING:root:Failed to import mayavi
WARNING:root:Failed to import mayavi
WARNING:root:Failed to import mayavi

You can see that it particularly says "root:Failed to import..."

My question is, why is this program searching for libraries as root? All the package paths are not locatable as root, which is expected, right?

I say this because if I run:

python
import mayavi

I get no problems.

If I run

sudo -i
python
import mayavi

I get: ImportError: No module named mayavi

As a result, I can't visualize anything.

ThomasDougherty commented 5 years ago

I too am having this issue!!

SilviaSapora commented 5 years ago

Can't you just run sudo pip install mayavi? Shouldn't that solve the problem? I know this is not good practice but I think it acceptable in this case.

jeffmahler commented 5 years ago

The term "root" in the logger means that you are using the root logger, not that you are running the program as root. What OS are you on, and are you using conda / virtualenv?

EvanLavizadeh commented 5 years ago

@SilviaSapora This does not solve the issue. @jeffmahler Thanks for that explanation. I am on Ubuntu 16.04, no conda, no virtualenv.

Aside, I know you warn against conda with Dexnet, but is Virtualenv advisable?

jeffmahler commented 5 years ago

@EvanLavizadeh Sorry for the delay. The use of virtualenv is desirable but I don't think this is the issue here.

The script should not be searching for packages on root. I have not seen that behavior before.

I suggest locating mayavi on the filesystem

sudo -i
python
>>> import mayavi
>>> print(mayavi.__file__)

Then check whether or not a path to this file exists in the normal (non-root) system path

python
>>> import sys
>>> print(sys.path)

If not, you could hack it by copying the mayavi installation to a location in the python path. Again, I don't know why this is happening. We are moving away from mayavi because of these kinds of issues.

EvanLavizadeh commented 5 years ago

@jeffmahler Ok I'll try this. Thank you. Does your lab sell licenses to more stable internal versions by any chance?

jeffmahler commented 5 years ago

@EvanLavizadeh Not yet. We are working on licensable version that may be ready sometime this year.

EvanLavizadeh commented 5 years ago

@jeffmahler Ok I'll be on the lookout :)

GeorgeDu commented 5 years ago

Dear all, I have the same problem in command 3: Display Object, and an black window occurs without 3D models. The dexnet was successfully installed and passed the setup.py test with no error. The WARNINGs are as follows:

root WARNING Failed to import gqcnn! Grasp2D functions will not be available. root WARNING Failed to import mayavi root WARNING Failed to import mayavi root WARNING Failed to import mayavi root WARNING Failed to import mayavi root WARNING Failed to import mayavi root WARNING Failed to import OpenRAVE root WARNING Failed to import mayavi root WARNING Failed to import OpenRAVE root INFO Failed to import mayavi

I have no problems in import mayavi in python, anyone can help? Thanks.