Flatcam not working on Raspberry pi 5 (Debian Bookworm)
is there an way to get Flatcam on Rapberry pi 5 (debian bookworm) working, on Raspberry Pi 4 it works perfect
regards Sigi
I've installed the linux version with much trouble getting all the dependencies installed, I'll list the steps separately. Then navigated to the folder and used the override: MESA_GL_VERSION_OVERRIDE=3.3 python3 FlatCAM.py This works, but you have to go to preferences and select Legacy 2D or the traces won't show, just the drill holes. When you do that though it crashes for me when opening a project, so all for naught.
Alternatively you can install the windows version in Wine. It is noticeably slower, but does show everything in Legacy 2D mode. It's usable but does crash a fair amount though, so save often.
The steps I noted. Your mileage may vary..
to get past the externally mangaged environment error use:
sudo mv /usr/lib/python3.11/EXTERNALLY-MANAGED /usr/lib/python3.11/EXTERNALLY-MANAGED.old
Now the python3 -m pip installs should work.
remember to reverse the mv command when you're done.
*****for rpi5 even wine wouldn't work for one install, but this did!!******************
-from https://bitbucket.org/jpcgt/flatcam/downloads/
-put the contents of FlatCAM_beta_8.994_sources into a new /opt/Flatcam/ folder
-used the turning off of managed enviro cmd above
-tried my best using synaptic and such to get dependencies installed so both of these would run
setup_ubuntu.sh and
pip3 install -r requirements.txt
hangs on the pyqt5 upgrade, but it is installed
-changed the target permissions with 'sudo chmod -R 777 FlatCAM.py'
-for the AttributeError: module 'collections' has no attribute 'MutableSequence'
in the file /opt/Flatcam/appCommon/Common.py added the 'abc' in the line:
'class LoudUniqueList(list, collections.abc.MutableSequence):'
-for the ImportError: cannot import name 'Iterable' from 'collections' error
in /opt/Flatcam/camlib.py
replaced the line 'from collections import Iterable' with:
import collections.abc
#hyper needs the four following aliases to be done manually.
collections.Iterable = collections.abc.Iterable
collections.Mapping = collections.abc.Mapping
collections.MutableSet = collections.abc.MutableSet
collections.MutableMapping = collections.abc.MutableMapping
-for the ModuleNotFoundError: No module named 'ezdxf.math.vector' stumbling block,
from this link:
https://fabacademy.org/2022/labs/sorbonne/students/chloe-laurent/cheatsheets/flatcam/#installation-on-ubuntu-2004
-commented out line 10 of /opt/Flatcam/appParsers/ParseDXF.py and
-added after it: (keep the indents)
try:
from ezdxf.math.vector import Vector as ezdxf_vector
except ImportError:
from ezdxf.math import Vec3 as ezdxf_vector
-then ran:
sudo pip uninstall vispy
pip install vispy==0.7
-then this command works! MESA_GL_VERSION_OVERRIDE=3.3 python3 FlatCAM.py
-if not then keep running it and adding packages it says are missed from the scripted installs
-sometimes use sudo -H python3 -m pip install --upgrade <package> or
sudo apt-get install python3-<package>
-make a new file in usr/share/applications/ called flatcam_launch.sh containing:
cd /opt/Flatcam/
MESA_GL_VERSION_OVERRIDE=3.3 python3 FlatCAM.py
-main menu editor -make a new item under CNC named 'FlatCAM' and target the flatcam_launch.sh file you created.
Good luck!
Finally success for both MX Linux and RPi5 installing FlatCAM and even using the 3D mode!
I enabled Pip with this: sudo mv /usr/lib/python3.11/EXTERNALLY-MANAGED /usr/lib/python3.11/EXTERNALLY-MANAGED.old
And from this clytle374 post, Jan 10, 2024: https://forums.gentoo.org/viewtopic-p-8691454.html?sid=e8af13f9fa5304cc305048fa93416087
Using this fork: git clone https://bitbucket.org/marius_stanciu/flatcam_beta then: pip install -r requirements.txt (this was successful first go maybe from all my previous work) pip install pyqtdarktheme==1.1.1 pip install darkdetect sudo chmod -R 777 FlatCAM.py
then to run: python3 FlatCAM.py (no mesa overrides needed)
and don't forget to re-enable external management: sudo mv /usr/lib/python3.11/EXTERNALLY-MANAGED.old /usr/lib/python3.11/EXTERNALLY-MANAGED