[Bf-committers] Python 3.3 problems on Ubuntu/Debian

IRIE Shinsuke irieshinsuke at yahoo.co.jp
Wed Nov 7 15:04:52 CET 2012

Dmitrijs Ledkovs, a package maintainer for 'blender' in Ubuntu,
proposed a solution for the build failure of Debian/Ubuntu package:


The solution uses pkg-config to find the include directories.
I'm not sure if this way can be used for all X11 systems, but it might
be helpful for fixing the problem.

IRIE Shinsuke

12/11/06, IRIE Shinsuke wrote:
> Hi,
> I was trying to build Blender with python3.3-dev package on Ubuntu
> 12.10, but the builds failed as follows:
> [ 33%] Building C object source/blender/python/intern/CMakeFiles/bf_python.dir/gpu.c.o
> In file included from /home/irie/Subversion/Blender/blender/source/blender/python/generic/bgl.c:38:0:
> /usr/include/python3.3m/Python.h:8:22: fatal error: pyconfig.h: No such file or directory
> compilation terminated.
> On Ubuntu/Debian, Python.h and pyconfig.h are placed in:
>    /usr/include/python3.3m/Python.h
>    /usr/include/x86_64-linux-gnu/python3.3m/pyconfig.h
> So the error occurs if assuming all headers are in the same directory.
> I reported this problem in Debian bug tracker.  Then, Debian's package
> maintainer considers this is Blender's bug, and he said
> "Please use python3.3-config --include".
> "python3.3-config --include" returns:
>    -I/usr/include/python3.3m -I/usr/include/x86_64-linux-gnu/python3.3m
> and indeed the build succeeded after setting CMAKE_C_FLAGS them.
> I attempted to set these paths to PYTHON_INCLUDE_DIR, but multiple
> paths cannot be set to it...
> I think FindPythonLibsUnix.cmake needs drastic changes.
> Also, there is another problem that numpy cannot be found when using
> Python3.3 on Ubuntu/Debian.  I get the following message:
> CMake Warning at CMakeLists.txt:1965 (message):
>    'numpy' path could not be found in:
>    '/usr/lib/x86_64-linux-gnu/python3.3/site-packages/numpy',
>    '/usr/lib/x86_64-linux-gnu/python3/site-packages/numpy',
>    '/usr/lib/x86_64-linux-gnu/python3.3/dist-packages/numpy',
>    '/usr/lib/x86_64-linux-gnu/python3/dist-packages/numpy',
>    WITH_PYTHON_INSTALL_NUMPY option will be ignored when installing python
> CMakeList.txt searches the above multi-arch paths for numpy, but
> numpy is actually in /usr/lib/python3/dist-packages/numpy.
> Thanks,

More information about the Bf-committers mailing list