pmneila / PyMCubes

Marching cubes (and related tools) for Python
BSD 3-Clause "New" or "Revised" License
692 stars 87 forks source link

mcubes/src/_mcubes.cpp:45:10: fatal error: Python.h: Нет такого файла или каталога #28

Closed pseudoua closed 4 years ago

pseudoua commented 4 years ago

gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -I/home/blender/Developer/build_linux/deps/Release/sqlite/include -I/home/blender/Developer/build_linux/deps/Release/bzip2/include -I/home/blender/Developer/build_linux/deps/Release/lzma/include -I/home/blender/Developer/build_linux/deps/Release/zlib/include -fPIC -fPIC -Imcubes/src -I/home/user/Загрузки/blender-2.91.0-a1d57e3f05f1-linux64/2.91/python/lib/python3.7/site-packages/numpy/core/include -I/home/user/Загрузки/blender-2.91.0-a1d57e3f05f1-linux64/2.91/python/include/python3.7m -c mcubes/src/_mcubes.cpp -o build/temp.linux-x86_64-3.7/mcubes/src/_mcubes.o -std=c++11 -Wall mcubes/src/_mcubes.cpp:45:10: fatal error: Python.h: Нет такого файла или каталога

include "Python.h"

          ^~~~~~~~~~
compilation terminated.
error: command 'gcc' failed with exit status 1
pseudoua commented 4 years ago

./python3.7m -m pip install -U PyMCubes

pmneila commented 4 years ago

Hi @pseudoua,

Sorry, this is not an issue with PyMCubes, but with your current development environment. You need to have the Python developer files installed in your system and configure your compiler accordingly. See for example https://stackoverflow.com/questions/21530577/fatal-error-python-h-no-such-file-or-directory

pseudoua commented 4 years ago

sorry for interrupting! P.S. python developer was already installed. Blender uses its internal version of Python. Its doesn't want to compile!

pmneila commented 4 years ago

I understand. Compiling Python packages for blender is possible but not straightforward. Blender does not ship the Python development files, so some manual setup is required.

The first answer to this question seems to have useful tips: https://blender.stackexchange.com/questions/81740/python-h-missing-in-blender-python

Hope that helps!

pseudoua commented 4 years ago

) Thanks! And so it was. An unexpectedly obvious solution!