Python 3

From FreeCAD Documentation
Jump to navigation Jump to search
Other languages:
Deutsch • ‎English • ‎français • ‎italiano • ‎polski

This roadmap is probably obsolete. For more information see Development roadmap.
If you are not involved with the development discussed here:

The port of FreeCAD to Python 3 support is currently underway and progress is being tracked in this forum thread. The master branch of FreeCAD is already usable with python3. Tests are passing, but there are still many little incompatibilities. TESTERS WANTED!

This document is a placeholder for various platforms' build instructions and a checklist to monitor progress.

Building FreeCAD w/ Python 3


The first step in building FreeCAD for Python 3 is ensuring you can build normally. Tip: It's also helpful to have a cmake GUI tool like cmake-qt-gui or cmake-curses-gui.

The following instructions are adapted from a post by looo in the Python 3 porting thread: Note: tested only with linux/ubuntu.

Download the current master of FreeCAD

 git clone

If python3 is your default python then there shouldn't be much to do. If not I think the easiest is to do: Set the python relevant cmake variables with cmake-gui which are:

- PYTHON_BASENAME (=PySideConfigPYTHON_SUFFIX.cmake) -> for me on ubuntu this would be this: .cpython-35m-x86_64-linux-gnu
- PYTHON_SUFFIX (=ShibokenConfigPYTHON_SUFFIX.cmake) -> eg.: .cpython-35m-x86_64-linux-gnu


python3 builds for freecad are available with this ppa

sudo add-apt-repository ppa:sppedflyer/mytestppa1
sudo apt-get update
sudo apt-get install python3-pivy


PySide for python3.5 isn't officially available, but I think ubuntu provides a build.

sudo apt-get install python3-pyside

Test builds on anaconda (linux64)

wget -c

and follow the instructions

once miniconda is installed we have to configure conda to have access to the freecad-builds:

conda config --add channels conda-forge
conda config --add channels freecad

now we create a new enviroment and install freecad

conda create --name freecad_py3 python=3.6 freecad

this will download all the necessary packages. When done activate the enviroment and start FreeCAD

source activate freecad_py3

the first time you launch freecad, matplotlib loads some modules, and therefore FreeCAD will need some time to show up.

Alternate Install


Install miniconda:

Install conda-build:

conda install conda_build

Add channels:

conda config --add channels freecad
conda config --add channels conda-forge

Clone the current Python 3 port of FreeCAD

git clone

Clone the conda-recipes for FreeCAD

git clone

- go to FreeCAD_Conda/.FreeCAD_debug

- set the variables on top of the script (the path to FreeCAD, and if you want to build with calling cmake)

conda build . --python=3.6 --dirty

(the dirty flag isn't necessary if you build the first time. If it isn't set conda does a full build all the time. The python option is not necessary if you have installed python3.6 miniconda version. But then you have to set this flag to build with python2.7....)


  • Follow latest Pyside developments: