Created
October 12, 2025 06:48
-
-
Save freckletonj/c399728d39b4f31f53ddc55fb9bed8ec to your computer and use it in GitHub Desktop.
FreeCAD venv environment
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # If you want to develop for FreeCAD in an environment that is aware of all the baked-in imports, simply do this! | |
| FreeCAD...AppImage --appimage-extract # create squashfs-root/ dir | |
| # create venv using appimage's python | |
| squashfs-root/usr/bin/python -m venv .env | |
| # Add this to `.env/bin/activate` | |
| export FREECAD_ROOT=<SQUASHFS_LOCATION>/usr | |
| export PYTHONPATH=$FREECAD_ROOT/lib:$FREECAD_ROOT/lib/python3.11/site-packages:$FREECAD_ROOT/lib/python3.11:$FREECAD_ROOT/Mod:$PYTHONPATH | |
| export LD_LIBRARY_PATH=$FREECAD_ROOT/lib:$FREECAD_ROOT/lib64:$LD_LIBRARY_PATH | |
| # start your env | |
| source .env/bin/activate | |
| # run your editor | |
| # run a python interpreter | |
| # imports work! (import FreeCAD, import Part, import CAM, etc) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
With this, you can import FreeCAD, load
FCStdfiles, run the interpreter, install whatever libs you want, etc and use it all from within your own editor/terminal.