Monday, February 8, 2016

Resolving the ImportError: No module named paraview.simple when running VeloView

VeloView is an open source viewer for displaying point cloud data from a Velodyne laser sensor, you know the one used in driverless Google cars. After downloading and compiling the VeloView source code on an Ubuntu computer, I encountered some error messages when running the VeloView application, as shown below.
"ImportError: No module named paraview.simple"

Even though the application's main window appears, none of the commands work. And the reference grid is not displayed in the 3D view.

I figured the problem has something to do with Python being unable to locate required modules, and I added all the locations of all the other VeloView compiled packages - Paraview, VeloView, VTK into the PYTHONPATH environment variable, as shown below.

  1. Open up the .profile file in the user's home directory in a text editor, e.g.

    $ cd
    $ vi .profile
  2. Add in the following line.

    export PYTHONPATH=$PYTHONPATH:/usr/local/lib/paraview-4.3/site-packages:/usr/local/lib/veloview-3.1/site-packages:/usr/local/lib/paraview-4.3/site-packages/vtk

    A part of the .profile file is shown in the screenshot below.

  3. Save and close the .profile file.

Now when the VeloView application is run, the ImportError message no longer appears.


No comments:

Related Posts with Thumbnails