openexr-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Openexr-devel] Getting started with OpenExr python bindings


From: James Crowther
Subject: [Openexr-devel] Getting started with OpenExr python bindings
Date: Thu, 13 Jul 2017 15:07:56 +1000

Hi there, 
I am a complete noob to the open exr bindings for python, I am running MacOSX sierra. 

I have managed to run ./configure, make and make install as dictated by the readme. However, I am lacking instructions for how to do the simplest of things, that is import the lib into python. The problem is the readme file that is part of the download for the pyilmbase doesn’t give any instructions or examples other than how to make ilmbase. So I am stuck. Any help at this stage to getting the libs to import into python would be helpful, I am attempting to use openexr bindings as part of an add-on for blender I am writing that enables distributed rendering. Openexr is the format of choice for us to send the results back to the requesting node, but in blender, the bindings are not available in the python api so we’re having to import them into our add-on from an external source, hence my attempt to build the bindings. But so far I am not having much luck. Again, any pointers or suggestions are welcome! I am targeting this add-on for windows, mac and linux too, I’ve yet to try this on windows or linux. 

I tried doing the following from a terminal.

~python
>>> import pyilmbase
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: No module named pyilmbase

I checked the sys.path and it shows the following


['', '/Library/Python/2.7/site-packages/pip-8.1.2-py2.7.egg', '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python27.zip', '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7', '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-darwin', '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac', '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac/lib-scriptpackages', '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-tk', '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-old', '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload', '/Library/Python/2.7/site-packages', '/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python', '/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/PyObjC']

The output from the ./configure then make then make install commands was 

Jamess-MacBook-pro:pyilmbase-2.2.0 jamesmac$ ./configure --disable-boostpythontest
checking build system type... x86_64-apple-darwin16.6.0
checking host system type... x86_64-apple-darwin16.6.0
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... ./install-sh -c -d
checking for gawk... no
checking for mawk... no
checking for nawk... no
checking for awk... awk
checking whether make sets $(MAKE)... yes
checking whether to enable maintainer-specific portions of Makefiles... no
checking for g++... g++
checking for C++ compiler default output file name... a.out
checking whether the C++ compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables... 
checking for suffix of object files... o
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking for style of include used by make... GNU
checking dependency style of g++... gcc3
checking for a BSD-compatible install... /usr/bin/install -c
checking whether ln -s works... yes
checking for gcc... gcc
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking dependency style of gcc... gcc3
checking for a sed that does not truncate output... /usr/bin/sed
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for fgrep... /usr/bin/grep -F
checking for ld used by gcc... /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld
checking if the linker (/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld) is GNU ld... no
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking the maximum length of command line arguments... 196608
checking whether the shell understands some XSI constructs... yes
checking whether the shell understands "+="... yes
checking for /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for ar... ar
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /usr/bin/nm -B output from gcc object... ok
checking for dsymutil... dsymutil
checking for nmedit... nmedit
checking for lipo... lipo
checking for otool... otool
checking for otool64... no
checking for -single_module linker flag... yes
checking for -exported_symbols_list linker flag... yes
checking how to run the C preprocessor... gcc -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for dlfcn.h... yes
checking whether we are using the GNU C++ compiler... (cached) yes
checking whether g++ accepts -g... (cached) yes
checking dependency style of g++... (cached) gcc3
checking how to run the C++ preprocessor... g++ -E
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... yes
checking for gcc option to produce PIC... -fno-common -DPIC
checking if gcc PIC flag -fno-common -DPIC works... yes
checking if gcc static flag -static works... no
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld) supports shared libraries... yes
checking dynamic linker characteristics... darwin16.6.0 dyld
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... no
checking for ld used by g++... /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld
checking if the linker (/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld) is GNU ld... no
checking whether the g++ linker (/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld) supports shared libraries... yes
checking for g++ option to produce PIC... -fno-common -DPIC
checking if g++ PIC flag -fno-common -DPIC works... yes
checking if g++ static flag -static works... no
checking if g++ supports -c -o file.o... yes
checking if g++ supports -c -o file.o... (cached) yes
checking whether the g++ linker (/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld) supports shared libraries... yes
checking dynamic linker characteristics... darwin16.6.0 dyld
checking how to hardcode library paths into programs... immediate
checking whether make sets $(MAKE)... (cached) yes
test_prefix = NONE
checking for pkg-config... /usr/local/bin/pkg-config
using pkg-config to set ILMBASE_CXXFLAGS and ILMBASE_LDFLAGS:
    ILMBASE_CXXFLAGS = -D_THREAD_SAFE -I/usr/local/include/OpenEXR
    ILMBASE_LDFLAGS = -L/usr/local/lib
    ILMBASE_LIBS = -L/usr/local/lib -lImath -lHalf -lIex -lIexMath -lIlmThread
checking for IlmBase... yes
Compiled and ran IlmBase test program.
checking for python... /Users/jamesmac/.pyenv/shims/python
checking for python version... 2.7
checking for python platform... darwin
checking for python script directory... ${prefix}/lib/python2.7/site-packages
checking for python extension module directory... ${exec_prefix}/lib/python2.7/site-packages
checking for boost::python... no
*** Could not run the boost::python test program, checking why...
*** The test program could not be compiled.  Is boost::python installed?
*** Check that the cflags (below) includes the boost::python include directory
***
*** Flags used by the test:
***     cflags: -g -O2  -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -g -O2  -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 
***     ldflags:  -L/usr/local/lib  -L/System/Library/Frameworks/Python.framework/Versions/2.7/lib  -L/usr/local/lib  -L/System/Library/Frameworks/Python.framework/Versions/2.7/lib
***
*** You can also run configure with --disable-boostpythontest to skip this test.
configure: error: Could not compile boost::python test program.
Jamess-MacBook-pro:pyilmbase-2.2.0 jamesmac$ make
make: *** No targets specified and no makefile found.  Stop.
Jamess-MacBook-pro:pyilmbase-2.2.0 jamesmac$ make install
make: Nothing to be done for `install'.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]