[vtkusers] VtK 7, python3.4 build error

Matthew Cragun mcragun at gmail.com
Sun Jan 3 14:24:57 EST 2016


David,

thanks for the response.

To provide some additional information, I have tried using python3.5
binaries straight off of python.org as wells as my anaconda installation.
Both give me the same error.

The variables I have set using ccmake and standard python are:


PYTHON_EXECUTABLE =
/Library/Frameworks/Python.framework/Versions/3.5/bin/python3.5
PYTHON_INCLUDE_DIR =
/Library/Frameworks/Python.framework/Versions/3.5/python3.5m
PYTHON_LIBRARY =
/Library/Frameworks/Python.framework/Versions/3.5/lib/libpython3.5.dylib


The contents of the lib folder are:
libformw.5.dylib    libmenuw.5.dylib    libncursesw.5.dylib
libpanelw.5.dylib   libpython3.5.dylib  pkgconfig
libformw.dylib      libmenuw.dylib      libncursesw.dylib   libpanelw.dylib
    libpython3.5m.dylib python3.5


Thanks,

Matt

On Fri, Jan 1, 2016 at 11:19 PM, David Gobbi <david.gobbi at gmail.com> wrote:

> 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/20160103/29a7a53e/attachment.html>


More information about the vtkusers mailing list