[vtkusers] VtK 7, python3.4 build error

David Gobbi david.gobbi at gmail.com
Sat Jan 2 00:19:54 EST 2016


Hi Matthew,

No, there aren't pre-build binaries with python 3.  I don't think that is
planned for this release.

I've been doing my OS X builds with the python binary packages from
python.org, so I know that those, at least, should work.

Can you give me some details about the python you are using?  Specifically,
can you tell me what the contents of the library directory (
/Users/mcragun/anaconda/envs/py3k/lib/) are?

Also, in the CMakeCache.txt, can you give me the values
of PYTHON_EXECUTABLE, PYTHON_INCLUDE_DIR, and PYTHON_LIBRARY?

For my build against the python.org binaries, VTK found the following:

PYTHON_EXECUTABLE:FILEPATH=/Library/Frameworks/Python.framework/Versions/3.4/bin/python3.4
PYTHON_INCLUDE_DIR:PATH=/Library/Frameworks/Python.framework/Versions/3.4/Headers/
PYTHON_LIBRARY:FILEPATH=/Library/Frameworks/Python.framework/Versions/3.4/lib/libpython3.4.dylib

Obviously the locations will be different for Anaconda, but I just wanted
to give you an example of how these variables can be set.

 - David

On Fri, Jan 1, 2016 at 9:45 PM, Matthew Cragun <mcragun at gmail.com> wrote:

> I am having trouble building VTK 7 with Python 3.4 on OS X 10.11 .
> Everything goes well for the first 99% of the process, however at the end,
> I get this error:
>
> [ 99%[ Building CXX object
> Wrapping/Python/CMakeFiles/vtkpython.dir/vtkPythonAppInit.cxx.o
> make[2]: *** No rule to make target
> `/Users/mcragun/anaconda/envs/py3k/lib/libpython3.4.dylib', needed by
> `bin/vtkpython'.  Stop.
> make[2]: *** Waiting for unfinished jobs....
> In file included from
> /Users/mcragun/Projects/VTK/Wrapping/Python/vtkPythonAppInit.cxx:29:
> /Users/mcragun/Projects/VTK-build/Wrapping/Python/vtkpythonmodules.h:119:3:
> error: no matching function
>       for call to 'PyImport_AppendInittab'
>   PyImport_AppendInittab(namevtkCommonCore, initvtkCommonCorePython);
>  ^~~~~~~~~~~~~~~~~~~~~~
> /Users/mcragun/anaconda/envs/py3k/include/python3.4m/import.h:109:17:
> note: candidate function not
>       viable: no known conversion from 'void ()' to 'PyObject *(*)()' for
> 2nd argument
> PyAPI_FUNC(int) PyImport_AppendInittab(
>                 ^
> In file included from
> /Users/mcragun/Projects/VTK/Wrapping/Python/vtkPythonAppInit.cxx:29:
> /Users/mcragun/Projects/VTK-build/Wrapping/Python/vtkpythonmodules.h:122:3:
> error: no matching function
>       for call to 'PyImport_AppendInittab'
>   PyImport_AppendInittab(namevtkCommonMath, initvtkCommonMathPython);
>   ^~~~~~~~~~~~~~~~~~~~~~
>
> Similar errors are repeated until...
>
>   ^~~~~~~~~~~~~~~~~~~~~~
> /Users/mcragun/anaconda/envs/py3k/include/python3.4m/import.h:109:17:
> note: candidate function not
>       viable: no known conversion from 'void ()' to 'PyObject *(*)()' for
> 2nd argument
> PyAPI_FUNC(int) PyImport_AppendInittab(
>                 ^
> fatal error: too many errors emitted, stopping now [-ferror-limit=]
> 20 errors generated.
> make[2]: ***
> [Wrapping/Python/CMakeFiles/vtkpython.dir/vtkPythonAppInit.cxx.o] Error 1
> make[1]: *** [Wrapping/Python/CMakeFiles/vtkpython.dir/all] Error 2
> make: *** [all] Error 2
>
> Any thoughts on what I missed?  Are there pre-built binaries with python 3
> for OS X?
>
> Thanks,
>
> Matt
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20160101/be4c3682/attachment.html>


More information about the vtkusers mailing list