Skip to content

Instantly share code, notes, and snippets.

@eugeniobonifacio
Last active January 4, 2026 12:33
Show Gist options
  • Select an option

  • Save eugeniobonifacio/a651d2ca9bb4017226a1315bd6a095f1 to your computer and use it in GitHub Desktop.

Select an option

Save eugeniobonifacio/a651d2ca9bb4017226a1315bd6a095f1 to your computer and use it in GitHub Desktop.
Install and run FlatCAM on modern linux distros
#!/bin/bash
# clone flatcam beta
git clone -b Beta https://bitbucket.org/jpcgt/flatcam.git flatcam-beta
# grab the python 3.8 AppImage
wget https://github.com/niess/python-appimage/releases/download/python3.8/python3.8.19-cp38-cp38-manylinux1_x86_64.AppImage
# make it executable
chmod +x python3.8.19-cp38-cp38-manylinux1_x86_64.AppImage
# create a short name utility link to the AppImage
ln -s python3.8.19-cp38-cp38-manylinux1_x86_64.AppImage py38
# create a virtual environment
./py38 -m venv .venv
# activate the environment
source .venv/bin/activate
# build GDAL manually, as probably the system has a newer version
wget https://github.com/OSGeo/gdal/releases/download/v3.3.3/gdal-3.3.3.tar.gz
tar -xvzf gdal-3.3.3.tar.gz
pushd gdal-3.3.3
./configure --with-python=$(which python) --prefix=$VIRTUAL_ENV
make -j$(nproc)
pushd swig/python/
python setup.py install
popd
popd
# override the requirements to working ones
cat << 'EOT' > requirements.txt
pyqt5>=5.15
numpy~=1.16
matplotlib==3.1.3
cycler~=0.10
python-dateutil~=2.1
kiwisolver~=1.1
six~=1.0
setuptools
dill~=0.3
rtree~=1.3
pyopengl~=3.0
vispy==0.7.0
ortools~=7.0
svg.path~=4.0
simplejson~=3.19
shapely~=1.7.0
freetype-py~=2.5
fontTools~=4.55
rasterio~=1.3
lxml~=5.3
ezdxf~=1.1
qrcode~=6.1
reportlab~=3.5
svglib~=1.5
#gdal~=3.3 #installed manually
pyserial~=3.4
protobuf~=3.20
EOT
# install them
pip install -r requirements.txt
# now you can launch FlatCAM
# .venv/bin/python flatcam-beta/FlatCAM.py
@eugeniobonifacio
Copy link
Author

I had started building an AppImage, but GDAL has some hardcoded paths, so this approach cannot be used. Therefore, I decided to create this script to provide a standalone installation instead. I hope you enjoy it!

@valro
Copy link

valro commented Jul 8, 2025

He instalado el entorno en ArchLinux y funciona perfectamente. Gracias

@il-ponz
Copy link

il-ponz commented Aug 18, 2025

thank you so much, working on fedora 42

@JavierSerna71
Copy link

ty bro

@gitnaute
Copy link

Hello,

First of all, congratulations and thank you for this installer, which also works perfectly under Debian (11, 12, and 13).

Just a quick question: this “standalone” installation of FlatCAM only works in ‘legacy’ mode, whereas the version installed as standard on the same PC works perfectly in “opengl” mode. Is there a solution to this problem?

Thank you in advance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment