Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
#!/bin/bash
# MAYAVI SETUP
# mayavi is a python library for scientific visualisations, that can handle
# visualisation of Lidar Data. But, it can also be used to project Lidar data
# to 2D images.
#
# The set of commands I used to get mayavi set up on my computer so far.
# NOTE: I still do not know if it is set up properly, so this set of steps
# might be incomplete.
# NOTE: python-vtk is a prerequisite of mayavi, but it only seems to be
# available for python 2.7
# NOTE: This setup assumes that a virtualenv called `tfcv` has been used to
# install the python libraries. You should modify the
# VIRTUAL_ENV_NAME, and VIRTUAL_ENV_ROOT to where you have your desired
# virtualenv located, or, remove any lines that mentions virtualenv
# if you are not using a virutalenv.
PYTHON_VERSION="2.7" #
VIRTUAL_ENV_NAME="tfcv" # Name of your virtualenv
VIRTUAL_ENV_ROOT="${HOME}/virtualenvs" # Where your virtual envs are stored
# REMOVE THE FOLLOWING 2 LINES IF YOU ARE NOT USING A VIRTUALENV
echo "ENTERING VIRTUALENV"
. ${VIRTUAL_ENV_ROOT}/${VIRTUAL_ENV_NAME}/bin/activate
echo "================================================"
echo "INSTALL LIBRARIES FOR PROCESSING POINT CLOUD DATA"
echo "================================================"
echo "INSTALLING VTK" # Prerequisite for mayavi
sudo apt-get install -y python-vtk
# REMOVE THE FOLLOWING 3 LINES IF YOU ARE NOT USING A VIRTUALENV
# CREATE LINK TO THE VTK FILES FROM THE VIRTUALENV
cd ${VIRTUAL_ENV_ROOT}/${VIRTUAL_ENV_NAME}/lib/python2.7/site-packages/
ln -s /usr/lib/pymodules/python2.7/vtk vtk
echo "INSTALLING MAYAVI"
sudo apt-get install python-dev
pip install mayavi
echo "INSTALLING GUI BACKEND FOR MAYAVI"
#pip install mayavi[TraitsBackendQt]
sudo apt-get install build-essential git cmake libqt4-dev libphonon-dev python2.7-dev libxml2-dev libxslt1-dev qtmobility-dev libqtwebkit-dev
pip install pyside
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment