QtPyVCP utilises VTK to provide GCode back plot functionality. Unfortunately there is no pip package for VTK and the normal installation of QtPyVCP fails. Below is the procedure using the development installation instructions with some adjustmentsto to use a specifically compiled version of VTK 7.1.1 with Qt5 and Python 2 wrapping. The key to being able to build VTK with OpenGL “legacy” is to install
libopengl-dev and configure with
VTK_RENDERING_BACKEND:STRING=OpenGL not OpenGL2 which tries to use later versions of OpenGL that are currently not supported on the RPi.
Download and install the VTK deb pacakge.
wget https://github.com/scottalford75/LinuxCNC-on-RPi/blob/master/Pi%20OS/vtk_7.1.1-qt5py2-1_armhf.deb sudo dpkg -i vtk_7.1.1-qt5py2-1_armhf.deb
.bashrc file in your home directory and add the following line. This will add the path to your PYTHONPATH each time xwindows starts.
export PYTHONPATH=/usr/local/lib/python2.7/site-packages:/usr/local/lib/python2.7/site-packages/vtk:$PYTHONPATH export LD_LIBRARY_PATH=/usr/local/lib:/usr/local/lib/python2.7/site-packages/vtk:$LD_LIBRARY_PATH
Install dependencies as per the QtPyVCP installation guide.
VTK 7.1.1 also has the following dependencies:
sudo apt-get install libhdf5-dev libnetcdf-cxx-legacy-dev libjsoncpp-dev libgl2ps-dev
In the qtpyvcp source directory, modify the setup.py and comment out the VTK dependency.
install_requires=[ 'docopt', 'qtpy', 'pyudev', 'psutil', 'HiYaPyCo', 'pyopengl', #'vtk', 'pyqtgraph', 'more-itertools', ],
Install QtPyVCP as per normal development installation instructions.
pip install --editable .
If you want to test with the simulation configurations simply copy the config directory from the
~/qtpyvcp/linuxcnc/configs directory into your