instructions for qtpyvcp for python 2.7  to work on RPI 4 64bit

More
04 Nov 2021 18:44 #225249 by Aaroncnc
To begin with we are going to assume you have a 64bit image with linux cnc running. 


edit .bashrc and add the following to it (file found in /home/pi you may need to enable see hidden files from the view menu)
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
export PATH=$PATH:~/.local/bin/

Download the custom VTK for 64bit
drive.google.com/file/d/1TkPFM6dI-PckKNB...ZNf/view?usp=sharing

Open terminal from where you downloaded the deb file (use the file browser and hit F4 to open terminal)
Run the below commands
sudo dpkg -i vtk_20211023-2_arm64.deb
sudo apt-get install libhdf5-dev libnetcdf-cxx-legacy-dev libjsoncpp-dev libgl2ps-dev ntp


sudo apt install python-pyqt5 python-dbus.mainloop.pyqt5 python-pyqt5.qtopengl python-pyqt5.qsci python-pyqt5.qtmultimedia qml-module-qtquick-controls gstreamer1.0-plugins-bad libqt5multimedia5-plugins pyqt5-dev-tools python-dev python-setuptools python-pip git
sudo apt install qttools5.dev qttools5-dev-tools python-wheel

Download the python 2.7 version of qtpyvcp
github.com/kcjengr/qtpyvcp/tree/python2_maintenance

Right click your download and select extract here
Browse to the folder extracted
edit the setup.py to look like below, just add # in front of 'vtk', (found inside qtpyvcp-python2_maintenance dir)
    install_requires=[
        'docopt',
        'qtpy',
        'pyudev',
        'psutil',
        'HiYaPyCo',
        'pyopengl',
        #'vtk',
        'pyqtgraph',
        'more-itertools',
    ],

Browse to  qtpyvcp-python2_maintenance/pyqt5designer/Qt5.7.1-64bit
copy both libpyqt5_py2.so & libpyqt5_py3.so
Then open terminal and run 
sudo pcmanfm

in this new file browser you can paste the 2 copied files to the following location (if you use the standard browser or dont use sudo the system wont let you paste the files)
/usr/local/plugins/designer

open a terminal inside qtpyvcp-python2_maintenance dir and run the below cmd (use the file browser and hit F4)

pip install --editable .

Restart your system for the .bashrc edits to work. if you skip this step you wont be able to run qtpyvcp from terminal as it will say command not found

Open a terminal anywhere and run
qtpyvcp -v

Output should be "QtPyVCP python2_maintenance"

Browse to "qtpyvcp-python2_maintenance" and copy the linuxcnc folder then go to your home folder (/home/pi) and rename the linuxcnc folder to "oldlinuxcnc", paste the copied folder

open terminal anywhere and run
linuxcnc

click my configurations select a qtpyvcp interface of your choice

 if all works Congrats you are done!


optional to overclock rpi4 (you must have a good heatsink with a fan actively cooling the chip also use the official rpi usb c psu)

run the following cmd in terminal
sudo nano /boot/config.txt
add the following lines
arm_freq=2000
gpu_freq=800
over_voltage=6
force_turbo=1
gpu_mem=512

To help with latency one can disable wifi and BT
dtoverlay=disable-wifi
dtoverlay=disable-bt

Also you can disable audio by adding # infront of dtparam=audio=on

To save changes press ctrl and o then hit enter
to exit press ctrl and x

Instructions to install probe basic interface
probe basic install


download 
github.com/kcjengr/qtpyvcp.conversational-gcode
github.com/kcjengr/probe_basic
extract both in your downloads folder
open terminal inside probe basic folder
run
qcompile .
pip freeze > requirments.txt
pip install -r requirments.txt

copy folder from /probe_basic-master/config to your linux cnc config directory  /home/pi/linuxcnc/configs



open folder qtpyvcp.conversational-gcode-master
run
pip install .


Now you should have probe basic with working VTK on a 64bit RPI
 
The following user(s) said Thank You: tommylight

Please Log in or Create an account to join the conversation.

Moderators: KCJLcvette
Time to create page: 0.104 seconds
Powered by Kunena Forum