Python 3

The port of FreeCAD to Python 3 support is currently underway and progress is being tracked in this forum thread.

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

Ubuntu
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 Python 3 port of FreeCAD git clone https://github.com/looooo/FreeCAD/tree/py3-21

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_EXECUTABLE - PYTHON_INCLUDE_DIR - PYTHON_LIBRARY - 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

Pivy
Then there is the need to compile pivy with python3: git clone https://github.com/looooo/pivy sudo python3 setup.py install

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

Conda
Install miniconda: http://conda.pydata.org/miniconda.html Install conda-build: conda install conda_build Add channel: conda config --add channels freecad Add channel: conda config --add channels conda-forge Clone the current Python 3 port of FreeCAD git clone https://github.com/looooo/FreeCAD/tree/py3-21 Clone the conda-recipes for FreeCAD git clone https://github.com/looooo/FreeCAD_Conda - 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.5 --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.5 miniconda version. But then you have to set this flag to build with python2.7....)

Links

 * Follow latest Pyside developments:
 * Progress Notes: https://wiki.qt.io/PySide2#Pyside_Development_Progress_Notes
 * Git commits: http://code.qt.io/cgit/pyside/pyside.git/log/