[pdal] Build pdal with python 3

Howard Butler howard at hobu.co
Sat Jan 30 07:46:46 PST 2016


> On Jan 30, 2016, at 2:58 AM, FE <flatearth at gmx.net> wrote:
> 
> Hi,
>  
> I've managed to build pdal 1.1.0 on OS X using cmake-gui and makefiles. It was build with python 2 by default. Python modules installed via 'pip install pdal' work (after several pathes in the libraries have been corrected manually with 'install_name_tool').

Please provide more detail on this one. If you install PDAL to its CMAKE_INSTALL_PREFIX path, install_name_tool and stuff should all be done for you.

>  
> However, since I work with python 3 I would like to build pdal with python 3 (it seems impossible to install pdal python modules in a python 3 environment having pdal build with python 2 -> causes various error messages).
> Would anybody like to explain how to build pdal with python 3 on OS X? I am not very deep into these techniques and did not manage until now.
>  
> How can I tell cmake to use python 3? It is unclear to me which python is used by cmake.
> I have three pythons on the computer. The system python is python 2, Homebrew python is python 2 (and python 3 could be installed easily), finally I use Anaconda with a python 3 environment.
> Does cmake only requires the python include directories? How to tell cmake which python to use?

We need specific error information and notes about where you had trouble. I build PDAL with embedded Python 3 as a normal part of development almost daily. See my cmake example configuration at [1] for inspiration.

I do see an error with the Python extension at the moment. It has been fixed in https://github.com/PDAL/PDAL/pull/1096 and confirmed to work with Python 3 for me.

Howard

[1] https://github.com/PDAL/PDAL/blob/master/cmake/examples/hobu-config.sh



More information about the pdal mailing list