Closed marwan-abdellah closed 1 year ago
This seems relevant; do you have hdf5 development libraries installed?
CMake Error at /private/var/folders/vs/ryptqcjs5ml6cfr542dk0915g73tv_/T/pip-build-env-18hfyec1/overlay/lib/python3.10/site-packages/cmake/data/share/cmake-3.26/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
Could NOT find HDF5 (missing: HDF5_LIBRARIES HDF5_INCLUDE_DIRS) (found
version "")
Yes. I have already tried to install morphio on my intel based macos and it works. The issue only happens on the M1 based mac.
Yes. I have already tried to install morphio on my intel based macos and it works.
Are you compiling it, or using the wheels? If it's compilation, you'll also need the hdf5 libraries installed.
We can try turning on, assuming it's available with the Github actions, an arm builder for wheels, and see if it works that way.
Since I recently wrote it up for something else, I'll share it here. This a dummy file for checking if HDF5 works:
#include <hdf5.h>
int main() {
auto file = H5Fcreate("foo.h5", H5F_ACC_EXCL, H5P_DEFAULT, H5P_DEFAULT);
H5Fclose(file);
return 0;
}
call it dummy.cpp
. Then use this CMakeLists.txt
to compile it:
cmake_minimum_required(VERSION 3.19)
project(Dummy)
find_package(HDF5 REQUIRED)
add_executable(dummy dummy.cpp)
target_link_libraries(dummy HDF5::HDF5)
Then you call
cmake -B build .
cmake --build build
This would allow you decide if the issue is in MorphIO's CMake code specifically or more generally related to finding HDF5.
@marwan-abdellah Any luck trying the suggestion above?
I have the same issue - was a solution found @marwan-abdellah ?
I have the same issue on MacOS with M1, but using Ubuntu docker image with Python 3.11.
I have the same issue on MacOS with M1, but using Ubuntu docker image with Python 3.11.
Installing an hdf5 apt package works for me:
sudo apt-get install libhdf5-dev
@twheatcroft07 Not that I know of. I cannot still install it on the new M1 chips.
@marwan-abdellah have you tried what @1uc suggested?
@mgeplf I tested it and it works.
$ cmake ..
-- The C compiler identification is AppleClang 14.0.3.14030022
-- The CXX compiler identification is AppleClang 14.0.3.14030022
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /Library/Developer/CommandLineTools/usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /Library/Developer/CommandLineTools/usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found HDF5: /opt/local/lib/libhdf5.dylib;/opt/local/lib/libaec/lib/libsz.dylib;/opt/local/lib/libz.dylib;/Library/Developer/CommandLineTools/SDKs/MacOSX13.3.sdk/usr/lib/libdl.tbd;/Library/Developer/CommandLineTools/SDKs/MacOSX13.3.sdk/usr/lib/libm.tbd (found version "1.14.1-2")
-- Configuring done
-- Generating done
-- Build files have been written to: /Users/abdellah/tmp/hdf/build
[ 8:50PM ] [ abdellah@Marwans-MacBook-Pro:~/tmp/hdf/build(system: ruby 2.6.10p210) ]
$ make
[ 50%] Building CXX object CMakeFiles/test.dir/test.cpp.o
/Users/abdellah/tmp/hdf/test.cpp:4:3: warning: 'auto' type specifier is a C++11 extension [-Wc++11-extensions]
auto file = H5Fcreate("foo.h5", H5F_ACC_EXCL, H5P_DEFAULT, H5P_DEFAULT);
^
1 warning generated.
[100%] Linking CXX executable test
[100%] Built target test
@mgeplf Nonetheless, I tried to compile MorphIO myself on the M1 mac, I got the following issues:
[8:53PM ] [ abdellah@Marwans-MacBook-Pro:~/tmp/MorphIO/build(master✔)(system: ruby 2.6.10p210) ]
$ cmake ..
-- The C compiler identification is AppleClang 14.0.3.14030022
-- The CXX compiler identification is AppleClang 14.0.3.14030022
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /Library/Developer/CommandLineTools/usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /Library/Developer/CommandLineTools/usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
Floating Point Type: float
-- Found HDF5: /opt/local/lib/libhdf5.dylib;/opt/local/lib/libaec/lib/libsz.dylib;/opt/local/lib/libz.dylib;/Library/Developer/CommandLineTools/SDKs/MacOSX13.3.sdk/usr/lib/libdl.tbd;/Library/Developer/CommandLineTools/SDKs/MacOSX13.3.sdk/usr/lib/libm.tbd (found version "1.14.1-2")
CMake Error at 3rdparty/CMakeLists.txt:8 (add_subdirectory):
The source directory
/Users/abdellah/tmp/MorphIO/3rdparty/HighFive
does not contain a CMakeLists.txt file.
CMake Error at 3rdparty/CMakeLists.txt:9 (target_include_directories):
Cannot specify include directories for target "HighFive" which is not built
by this project.
CMake Error at 3rdparty/CMakeLists.txt:12 (add_subdirectory):
The source directory
/Users/abdellah/tmp/MorphIO/3rdparty/GSL_LITE
does not contain a CMakeLists.txt file.
CMake Error at 3rdparty/CMakeLists.txt:13 (target_include_directories):
Cannot specify include directories for target "gsl-lite" which is not built
by this project.
CMake Error at 3rdparty/CMakeLists.txt:18 (add_subdirectory):
The source directory
/Users/abdellah/tmp/MorphIO/3rdparty/ghc_filesystem
does not contain a CMakeLists.txt file.
CMake Error at binds/python/CMakeLists.txt:2 (add_subdirectory):
The source directory
/Users/abdellah/tmp/MorphIO/binds/python/pybind11
does not contain a CMakeLists.txt file.
CMake Error at binds/python/CMakeLists.txt:5 (pybind11_add_module):
Unknown CMake command "pybind11_add_module".
CMake Error at 3rdparty/CMakeLists.txt:8 (add_subdirectory):
That looks like the submodules havne't been pulled:
git submodule update --init --recursive
Should fix that problem.
@mgeplf So I managed to compile it on my M1 mac now. But why is it still failing when I pip it then?
I gave it another try with Python3.9 and it is installable. I can confirm
$ pip3 install morphio
Defaulting to user installation because normal site-packages is not writeable
Collecting morphio
Using cached MorphIO-3.3.5.tar.gz (576 kB)
Installing build dependencies ... done
Getting requirements to build wheel ... done
Installing backend dependencies ... done
Preparing metadata (pyproject.toml) ... done
Requirement already satisfied: numpy>=1.14.1 in /Users/abdellah/Library/Python/3.9/lib/python/site-packages (from morphio) (1.25.0)
Building wheels for collected packages: morphio
Building wheel for morphio (pyproject.toml) ... done
Created wheel for morphio: filename=MorphIO-3.3.5-cp39-cp39-macosx_13_0_universal2.whl size=602848 sha256=6b0ce9f9f6604aa90084dfff85570958286240d90cc46659931b86d63a5d21a3
Stored in directory: /Users/abdellah/Library/Caches/pip/wheels/fe/14/65/2444eb52f7d64ba38e5563a81fbdf8a913b1319248e730419f
Successfully built morphio
Installing collected packages: morphio
Successfully installed morphio-3.3.5
[ 11:50AM ] [ abdellah@Marwans-MacBook-Pro:~/tmp/MorphIO/build/binds/python/pybind11(master✔)(system: ruby 2.6.10p210) ]
$ pip3 --version
pip 23.1.2 from /Users/abdellah/Library/Python/3.9/lib/python/site-packages/pip (python 3.9)
@mgeplf With Python 3.10, it fails though, when it is trying to create the python bindings as shown below
[notice] To update, run: /Applications/Blender.app/Contents/Resources/3.5/python/bin/python3.10 -m pip install --upgrade pip
[ 11:53AM ] [ abdellah@Marwans-MacBook-Pro:/Applications/Blender.app/Contents/Resources/3.5/python/bin(system: ruby 2.6.10p210) ]
$ ./python3.10 -m pip install morphio
Defaulting to user installation because normal site-packages is not writeable
Collecting morphio
Using cached MorphIO-3.3.5.tar.gz (576 kB)
Installing build dependencies ... done
Getting requirements to build wheel ... done
Installing backend dependencies ... done
Preparing metadata (pyproject.toml) ... done
Requirement already satisfied: numpy>=1.14.1 in /Applications/Blender.app/Contents/Resources/3.5/python/lib/python3.10/site-packages (from morphio) (1.23.5)
Building wheels for collected packages: morphio
Building wheel for morphio (pyproject.toml) ... error
error: subprocess-exited-with-error
× Building wheel for morphio (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [173 lines of output]
running bdist_wheel
running build
running build_py
creating build
creating build/lib.macosx-11.00-arm64-cpython-310
creating build/lib.macosx-11.00-arm64-cpython-310/morphio
copying morphio/__init__.py -> build/lib.macosx-11.00-arm64-cpython-310/morphio
creating build/lib.macosx-11.00-arm64-cpython-310/morphio/mut
copying morphio/mut/__init__.py -> build/lib.macosx-11.00-arm64-cpython-310/morphio/mut
creating build/lib.macosx-11.00-arm64-cpython-310/morphio/vasculature
copying morphio/vasculature/__init__.py -> build/lib.macosx-11.00-arm64-cpython-310/morphio/vasculature
running build_ext
-- The C compiler identification is AppleClang 14.0.3.14030022
-- The CXX compiler identification is AppleClang 14.0.3.14030022
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /Library/Developer/CommandLineTools/usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /Library/Developer/CommandLineTools/usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
Floating Point Type: float
-- Found HDF5: /opt/local/lib/libhdf5.dylib;/opt/local/lib/libaec/lib/libsz.dylib;/opt/local/lib/libz.dylib;/Library/Developer/CommandLineTools/SDKs/MacOSX13.3.sdk/usr/lib/libdl.tbd;/Library/Developer/CommandLineTools/SDKs/MacOSX13.3.sdk/usr/lib/libm.tbd (found version "1.14.1-2")
-- Could NOT find Doxygen (missing: DOXYGEN_EXECUTABLE)
-- Documentation (doc) cannot be built since Doxygen is not available.
-- Project 'gsl_lite', package 'gsl-lite' version: '0.40.0'
-- System name: Darwin
-- Compiler ID: AppleClang
-- CMAKE_CXX_COMPILE_FEATURES: cxx_std_98;cxx_template_template_parameters;cxx_std_11;cxx_alias_templates;cxx_alignas;cxx_alignof;cxx_attributes;cxx_auto_type;cxx_constexpr;cxx_decltype;cxx_decltype_incomplete_return_types;cxx_default_function_template_args;cxx_defaulted_functions;cxx_defaulted_move_initializers;cxx_delegating_constructors;cxx_deleted_functions;cxx_enum_forward_declarations;cxx_explicit_conversions;cxx_extended_friend_declarations;cxx_extern_templates;cxx_final;cxx_func_identifier;cxx_generalized_initializers;cxx_inheriting_constructors;cxx_inline_namespaces;cxx_lambdas;cxx_local_type_template_args;cxx_long_long_type;cxx_noexcept;cxx_nonstatic_member_init;cxx_nullptr;cxx_override;cxx_range_for;cxx_raw_string_literals;cxx_reference_qualified_functions;cxx_right_angle_brackets;cxx_rvalue_references;cxx_sizeof_member;cxx_static_assert;cxx_strong_enums;cxx_thread_local;cxx_trailing_return_types;cxx_unicode_literals;cxx_uniform_initialization;cxx_unrestricted_unions;cxx_user_literals;cxx_variadic_macros;cxx_variadic_templates;cxx_std_14;cxx_aggregate_default_initializers;cxx_attribute_deprecated;cxx_binary_literals;cxx_contextual_conversions;cxx_decltype_auto;cxx_digit_separators;cxx_generic_lambdas;cxx_lambda_init_captures;cxx_relaxed_constexpr;cxx_return_type_deduction;cxx_variable_templates;cxx_std_17;cxx_std_20;cxx_std_23
-- pybind11 v2.10.0
-- Found PythonInterp: /Applications/Blender.app/Contents/Resources/3.5/python/bin/python3.10 (found suitable version "3.10.9", minimum required is "3.6")
-- Found PythonLibs: python3.10
-- Performing Test HAS_FLTO
-- Performing Test HAS_FLTO - Success
-- Performing Test HAS_FLTO_THIN
-- Performing Test HAS_FLTO_THIN - Success
-- Warning: this does not have an effect - use NO_SYSTEM_FROM_IMPORTED if using imported targets
-- Configuring done (1.9s)
-- Generating done (0.0s)
-- Build files have been written to: /private/var/folders/kq/xgn53kss4qggy4z71lzwpgjc0000gn/T/pip-install-qk4p6c5b/morphio_7eef5e69fc56416786b04c27d5470128/build/temp.macosx-11.00-arm64-cpython-310
[1/40] Building CXX object src/CMakeFiles/morphio_obj.dir/endoplasmic_reticulum.cpp.o
[2/40] Building CXX object src/CMakeFiles/morphio_obj.dir/mut/endoplasmic_reticulum.cpp.o
[3/40] Building CXX object src/CMakeFiles/morphio_obj.dir/enums.cpp.o
[4/40] Building CXX object src/CMakeFiles/morphio_obj.dir/dendritic_spine.cpp.o
[5/40] Building CXX object src/CMakeFiles/morphio_obj.dir/glial_cell.cpp.o
[6/40] Building CXX object src/CMakeFiles/morphio_obj.dir/mitochondria.cpp.o
[7/40] Building CXX object src/CMakeFiles/morphio_obj.dir/mito_section.cpp.o
[8/40] Building CXX object src/CMakeFiles/morphio_obj.dir/mut/glial_cell.cpp.o
[9/40] Building CXX object src/CMakeFiles/morphio_obj.dir/mut/dendritic_spine.cpp.o
[10/40] Building CXX object src/CMakeFiles/morphio_obj.dir/errorMessages.cpp.o
[11/40] Building CXX object src/CMakeFiles/morphio_obj.dir/point_utils.cpp.o
[12/40] Building CXX object src/CMakeFiles/morphio_obj.dir/mut/mito_section.cpp.o
[13/40] Building CXX object src/CMakeFiles/morphio_obj.dir/mut/soma.cpp.o
[14/40] Building CXX object src/CMakeFiles/morphio_obj.dir/collection.cpp.o
[15/40] Building CXX object src/CMakeFiles/morphio_obj.dir/mut/modifiers.cpp.o
[16/40] Building CXX object src/CMakeFiles/morphio_obj.dir/morphology.cpp.o
[17/40] Building CXX object src/CMakeFiles/morphio_obj.dir/mut/mitochondria.cpp.o
[18/40] Building CXX object src/CMakeFiles/morphio_obj.dir/properties.cpp.o
[19/40] Building CXX object src/CMakeFiles/morphio_obj.dir/mut/section.cpp.o
[20/40] Building CXX object src/CMakeFiles/morphio_obj.dir/soma.cpp.o
[21/40] Building CXX object src/CMakeFiles/morphio_obj.dir/section.cpp.o
[22/40] Building CXX object src/CMakeFiles/morphio_obj.dir/version.cpp.o
[23/40] Building CXX object src/CMakeFiles/morphio_obj.dir/vasc/properties.cpp.o
[24/40] Building CXX object src/CMakeFiles/morphio_obj.dir/vasc/section.cpp.o
[25/40] Building CXX object binds/python/CMakeFiles/_morphio.dir/morphio.cpp.o
FAILED: binds/python/CMakeFiles/_morphio.dir/morphio.cpp.o
/Library/Developer/CommandLineTools/usr/bin/c++ -D_morphio_EXPORTS -isystem /private/var/folders/kq/xgn53kss4qggy4z71lzwpgjc0000gn/T/pip-install-qk4p6c5b/morphio_7eef5e69fc56416786b04c27d5470128/binds/python/pybind11/include -isystem /Applications/Blender.app/Contents/Resources/3.5/python/include/python3.10 -isystem /private/var/folders/kq/xgn53kss4qggy4z71lzwpgjc0000gn/T/pip-install-qk4p6c5b/morphio_7eef5e69fc56416786b04c27d5470128/include -isystem /private/var/folders/kq/xgn53kss4qggy4z71lzwpgjc0000gn/T/pip-install-qk4p6c5b/morphio_7eef5e69fc56416786b04c27d5470128/3rdparty/GSL_LITE/include -isystem /private/var/folders/kq/xgn53kss4qggy4z71lzwpgjc0000gn/T/pip-install-qk4p6c5b/morphio_7eef5e69fc56416786b04c27d5470128/3rdparty/HighFive/include -isystem /private/var/folders/kq/xgn53kss4qggy4z71lzwpgjc0000gn/T/pip-install-qk4p6c5b/morphio_7eef5e69fc56416786b04c27d5470128/build/temp.macosx-11.00-arm64-cpython-310/3rdparty/HighFive/include -isystem /opt/local/include -Wno-undef -fcomment-block-commands=file -O3 -DNDEBUG -std=gnu++14 -arch arm64 -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX13.3.sdk -fPIC -fvisibility=hidden -flto -MD -MT binds/python/CMakeFiles/_morphio.dir/morphio.cpp.o -MF binds/python/CMakeFiles/_morphio.dir/morphio.cpp.o.d -o binds/python/CMakeFiles/_morphio.dir/morphio.cpp.o -c /private/var/folders/kq/xgn53kss4qggy4z71lzwpgjc0000gn/T/pip-install-qk4p6c5b/morphio_7eef5e69fc56416786b04c27d5470128/binds/python/morphio.cpp
In file included from /private/var/folders/kq/xgn53kss4qggy4z71lzwpgjc0000gn/T/pip-install-qk4p6c5b/morphio_7eef5e69fc56416786b04c27d5470128/binds/python/morphio.cpp:1:
In file included from /private/var/folders/kq/xgn53kss4qggy4z71lzwpgjc0000gn/T/pip-install-qk4p6c5b/morphio_7eef5e69fc56416786b04c27d5470128/binds/python/pybind11/include/pybind11/pybind11.h:13:
In file included from /private/var/folders/kq/xgn53kss4qggy4z71lzwpgjc0000gn/T/pip-install-qk4p6c5b/morphio_7eef5e69fc56416786b04c27d5470128/binds/python/pybind11/include/pybind11/detail/class.h:12:
In file included from /private/var/folders/kq/xgn53kss4qggy4z71lzwpgjc0000gn/T/pip-install-qk4p6c5b/morphio_7eef5e69fc56416786b04c27d5470128/binds/python/pybind11/include/pybind11/detail/../attr.h:13:
/private/var/folders/kq/xgn53kss4qggy4z71lzwpgjc0000gn/T/pip-install-qk4p6c5b/morphio_7eef5e69fc56416786b04c27d5470128/binds/python/pybind11/include/pybind11/detail/common.h:212:10: fatal error: 'Python.h' file not found
#include <Python.h>
^~~~~~~~~~
1 error generated.
[26/40] Building CXX object src/CMakeFiles/morphio_obj.dir/readers/morphologySWC.cpp.o
[27/40] Building CXX object src/CMakeFiles/morphio_obj.dir/shared_utils.cpp.o
[28/40] Building CXX object binds/python/CMakeFiles/_morphio.dir/bind_immutable.cpp.o
FAILED: binds/python/CMakeFiles/_morphio.dir/bind_immutable.cpp.o
/Library/Developer/CommandLineTools/usr/bin/c++ -D_morphio_EXPORTS -isystem /private/var/folders/kq/xgn53kss4qggy4z71lzwpgjc0000gn/T/pip-install-qk4p6c5b/morphio_7eef5e69fc56416786b04c27d5470128/binds/python/pybind11/include -isystem /Applications/Blender.app/Contents/Resources/3.5/python/include/python3.10 -isystem /private/var/folders/kq/xgn53kss4qggy4z71lzwpgjc0000gn/T/pip-install-qk4p6c5b/morphio_7eef5e69fc56416786b04c27d5470128/include -isystem /private/var/folders/kq/xgn53kss4qggy4z71lzwpgjc0000gn/T/pip-install-qk4p6c5b/morphio_7eef5e69fc56416786b04c27d5470128/3rdparty/GSL_LITE/include -isystem /private/var/folders/kq/xgn53kss4qggy4z71lzwpgjc0000gn/T/pip-install-qk4p6c5b/morphio_7eef5e69fc56416786b04c27d5470128/3rdparty/HighFive/include -isystem /private/var/folders/kq/xgn53kss4qggy4z71lzwpgjc0000gn/T/pip-install-qk4p6c5b/morphio_7eef5e69fc56416786b04c27d5470128/build/temp.macosx-11.00-arm64-cpython-310/3rdparty/HighFive/include -isystem /opt/local/include -Wno-undef -fcomment-block-commands=file -O3 -DNDEBUG -std=gnu++14 -arch arm64 -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX13.3.sdk -fPIC -fvisibility=hidden -flto -MD -MT binds/python/CMakeFiles/_morphio.dir/bind_immutable.cpp.o -MF binds/python/CMakeFiles/_morphio.dir/bind_immutable.cpp.o.d -o binds/python/CMakeFiles/_morphio.dir/bind_immutable.cpp.o -c /private/var/folders/kq/xgn53kss4qggy4z71lzwpgjc0000gn/T/pip-install-qk4p6c5b/morphio_7eef5e69fc56416786b04c27d5470128/binds/python/bind_immutable.cpp
In file included from /private/var/folders/kq/xgn53kss4qggy4z71lzwpgjc0000gn/T/pip-install-qk4p6c5b/morphio_7eef5e69fc56416786b04c27d5470128/binds/python/bind_immutable.cpp:1:
In file included from /private/var/folders/kq/xgn53kss4qggy4z71lzwpgjc0000gn/T/pip-install-qk4p6c5b/morphio_7eef5e69fc56416786b04c27d5470128/binds/python/bind_immutable.h:3:
In file included from /private/var/folders/kq/xgn53kss4qggy4z71lzwpgjc0000gn/T/pip-install-qk4p6c5b/morphio_7eef5e69fc56416786b04c27d5470128/binds/python/pybind11/include/pybind11/pybind11.h:13:
In file included from /private/var/folders/kq/xgn53kss4qggy4z71lzwpgjc0000gn/T/pip-install-qk4p6c5b/morphio_7eef5e69fc56416786b04c27d5470128/binds/python/pybind11/include/pybind11/detail/class.h:12:
In file included from /private/var/folders/kq/xgn53kss4qggy4z71lzwpgjc0000gn/T/pip-install-qk4p6c5b/morphio_7eef5e69fc56416786b04c27d5470128/binds/python/pybind11/include/pybind11/detail/../attr.h:13:
/private/var/folders/kq/xgn53kss4qggy4z71lzwpgjc0000gn/T/pip-install-qk4p6c5b/morphio_7eef5e69fc56416786b04c27d5470128/binds/python/pybind11/include/pybind11/detail/common.h:212:10: fatal error: 'Python.h' file not found
#include <Python.h>
^~~~~~~~~~
1 error generated.
[29/40] Building CXX object binds/python/CMakeFiles/_morphio.dir/bindings_utils.cpp.o
FAILED: binds/python/CMakeFiles/_morphio.dir/bindings_utils.cpp.o
/Library/Developer/CommandLineTools/usr/bin/c++ -D_morphio_EXPORTS -isystem /private/var/folders/kq/xgn53kss4qggy4z71lzwpgjc0000gn/T/pip-install-qk4p6c5b/morphio_7eef5e69fc56416786b04c27d5470128/binds/python/pybind11/include -isystem /Applications/Blender.app/Contents/Resources/3.5/python/include/python3.10 -isystem /private/var/folders/kq/xgn53kss4qggy4z71lzwpgjc0000gn/T/pip-install-qk4p6c5b/morphio_7eef5e69fc56416786b04c27d5470128/include -isystem /private/var/folders/kq/xgn53kss4qggy4z71lzwpgjc0000gn/T/pip-install-qk4p6c5b/morphio_7eef5e69fc56416786b04c27d5470128/3rdparty/GSL_LITE/include -isystem /private/var/folders/kq/xgn53kss4qggy4z71lzwpgjc0000gn/T/pip-install-qk4p6c5b/morphio_7eef5e69fc56416786b04c27d5470128/3rdparty/HighFive/include -isystem /private/var/folders/kq/xgn53kss4qggy4z71lzwpgjc0000gn/T/pip-install-qk4p6c5b/morphio_7eef5e69fc56416786b04c27d5470128/build/temp.macosx-11.00-arm64-cpython-310/3rdparty/HighFive/include -isystem /opt/local/include -Wno-undef -fcomment-block-commands=file -O3 -DNDEBUG -std=gnu++14 -arch arm64 -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX13.3.sdk -fPIC -fvisibility=hidden -flto -MD -MT binds/python/CMakeFiles/_morphio.dir/bindings_utils.cpp.o -MF binds/python/CMakeFiles/_morphio.dir/bindings_utils.cpp.o.d -o binds/python/CMakeFiles/_morphio.dir/bindings_utils.cpp.o -c /private/var/folders/kq/xgn53kss4qggy4z71lzwpgjc0000gn/T/pip-install-qk4p6c5b/morphio_7eef5e69fc56416786b04c27d5470128/binds/python/bindings_utils.cpp
In file included from /private/var/folders/kq/xgn53kss4qggy4z71lzwpgjc0000gn/T/pip-install-qk4p6c5b/morphio_7eef5e69fc56416786b04c27d5470128/binds/python/bindings_utils.cpp:1:
In file included from /private/var/folders/kq/xgn53kss4qggy4z71lzwpgjc0000gn/T/pip-install-qk4p6c5b/morphio_7eef5e69fc56416786b04c27d5470128/binds/python/bindings_utils.h:3:
In file included from /private/var/folders/kq/xgn53kss4qggy4z71lzwpgjc0000gn/T/pip-install-qk4p6c5b/morphio_7eef5e69fc56416786b04c27d5470128/binds/python/pybind11/include/pybind11/numpy.h:12:
In file included from /private/var/folders/kq/xgn53kss4qggy4z71lzwpgjc0000gn/T/pip-install-qk4p6c5b/morphio_7eef5e69fc56416786b04c27d5470128/binds/python/pybind11/include/pybind11/pybind11.h:13:
In file included from /private/var/folders/kq/xgn53kss4qggy4z71lzwpgjc0000gn/T/pip-install-qk4p6c5b/morphio_7eef5e69fc56416786b04c27d5470128/binds/python/pybind11/include/pybind11/detail/class.h:12:
In file included from /private/var/folders/kq/xgn53kss4qggy4z71lzwpgjc0000gn/T/pip-install-qk4p6c5b/morphio_7eef5e69fc56416786b04c27d5470128/binds/python/pybind11/include/pybind11/detail/../attr.h:13:
/private/var/folders/kq/xgn53kss4qggy4z71lzwpgjc0000gn/T/pip-install-qk4p6c5b/morphio_7eef5e69fc56416786b04c27d5470128/binds/python/pybind11/include/pybind11/detail/common.h:212:10: fatal error: 'Python.h' file not found
#include <Python.h>
^~~~~~~~~~
1 error generated.
[30/40] Building CXX object binds/python/CMakeFiles/_morphio.dir/bind_misc.cpp.o
FAILED: binds/python/CMakeFiles/_morphio.dir/bind_misc.cpp.o
/Library/Developer/CommandLineTools/usr/bin/c++ -D_morphio_EXPORTS -isystem /private/var/folders/kq/xgn53kss4qggy4z71lzwpgjc0000gn/T/pip-install-qk4p6c5b/morphio_7eef5e69fc56416786b04c27d5470128/binds/python/pybind11/include -isystem /Applications/Blender.app/Contents/Resources/3.5/python/include/python3.10 -isystem /private/var/folders/kq/xgn53kss4qggy4z71lzwpgjc0000gn/T/pip-install-qk4p6c5b/morphio_7eef5e69fc56416786b04c27d5470128/include -isystem /private/var/folders/kq/xgn53kss4qggy4z71lzwpgjc0000gn/T/pip-install-qk4p6c5b/morphio_7eef5e69fc56416786b04c27d5470128/3rdparty/GSL_LITE/include -isystem /private/var/folders/kq/xgn53kss4qggy4z71lzwpgjc0000gn/T/pip-install-qk4p6c5b/morphio_7eef5e69fc56416786b04c27d5470128/3rdparty/HighFive/include -isystem /private/var/folders/kq/xgn53kss4qggy4z71lzwpgjc0000gn/T/pip-install-qk4p6c5b/morphio_7eef5e69fc56416786b04c27d5470128/build/temp.macosx-11.00-arm64-cpython-310/3rdparty/HighFive/include -isystem /opt/local/include -Wno-undef -fcomment-block-commands=file -O3 -DNDEBUG -std=gnu++14 -arch arm64 -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX13.3.sdk -fPIC -fvisibility=hidden -flto -MD -MT binds/python/CMakeFiles/_morphio.dir/bind_misc.cpp.o -MF binds/python/CMakeFiles/_morphio.dir/bind_misc.cpp.o.d -o binds/python/CMakeFiles/_morphio.dir/bind_misc.cpp.o -c /private/var/folders/kq/xgn53kss4qggy4z71lzwpgjc0000gn/T/pip-install-qk4p6c5b/morphio_7eef5e69fc56416786b04c27d5470128/binds/python/bind_misc.cpp
In file included from /private/var/folders/kq/xgn53kss4qggy4z71lzwpgjc0000gn/T/pip-install-qk4p6c5b/morphio_7eef5e69fc56416786b04c27d5470128/binds/python/bind_misc.cpp:1:
In file included from /private/var/folders/kq/xgn53kss4qggy4z71lzwpgjc0000gn/T/pip-install-qk4p6c5b/morphio_7eef5e69fc56416786b04c27d5470128/binds/python/bind_misc.h:3:
In file included from /private/var/folders/kq/xgn53kss4qggy4z71lzwpgjc0000gn/T/pip-install-qk4p6c5b/morphio_7eef5e69fc56416786b04c27d5470128/binds/python/pybind11/include/pybind11/pybind11.h:13:
In file included from /private/var/folders/kq/xgn53kss4qggy4z71lzwpgjc0000gn/T/pip-install-qk4p6c5b/morphio_7eef5e69fc56416786b04c27d5470128/binds/python/pybind11/include/pybind11/detail/class.h:12:
In file included from /private/var/folders/kq/xgn53kss4qggy4z71lzwpgjc0000gn/T/pip-install-qk4p6c5b/morphio_7eef5e69fc56416786b04c27d5470128/binds/python/pybind11/include/pybind11/detail/../attr.h:13:
/private/var/folders/kq/xgn53kss4qggy4z71lzwpgjc0000gn/T/pip-install-qk4p6c5b/morphio_7eef5e69fc56416786b04c27d5470128/binds/python/pybind11/include/pybind11/detail/common.h:212:10: fatal error: 'Python.h' file not found
#include <Python.h>
^~~~~~~~~~
1 error generated.
[31/40] Building CXX object src/CMakeFiles/morphio_obj.dir/mut/morphology.cpp.o
[32/40] Building CXX object src/CMakeFiles/morphio_obj.dir/vasc/vasculature.cpp.o
[33/40] Building CXX object src/CMakeFiles/morphio_obj.dir/readers/vasculatureHDF5.cpp.o
[34/40] Building CXX object src/CMakeFiles/morphio_obj.dir/mut/writers.cpp.o
[35/40] Building CXX object src/CMakeFiles/morphio_obj.dir/readers/morphologyHDF5.cpp.o
[36/40] Building CXX object src/CMakeFiles/morphio_obj.dir/readers/morphologyASC.cpp.o
ninja: build stopped: subcommand failed.
Traceback (most recent call last):
File "/Applications/Blender.app/Contents/Resources/3.5/python/lib/python3.10/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 351, in <module>
main()
File "/Applications/Blender.app/Contents/Resources/3.5/python/lib/python3.10/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 333, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
File "/Applications/Blender.app/Contents/Resources/3.5/python/lib/python3.10/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 249, in build_wheel
return _build_backend().build_wheel(wheel_directory, config_settings,
File "/private/var/folders/kq/xgn53kss4qggy4z71lzwpgjc0000gn/T/pip-build-env-5k41opc9/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 416, in build_wheel
return self._build_with_temp_dir(['bdist_wheel'], '.whl',
File "/private/var/folders/kq/xgn53kss4qggy4z71lzwpgjc0000gn/T/pip-build-env-5k41opc9/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 401, in _build_with_temp_dir
self.run_setup()
File "/private/var/folders/kq/xgn53kss4qggy4z71lzwpgjc0000gn/T/pip-build-env-5k41opc9/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 487, in run_setup
super(_BuildMetaLegacyBackend,
File "/private/var/folders/kq/xgn53kss4qggy4z71lzwpgjc0000gn/T/pip-build-env-5k41opc9/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 338, in run_setup
exec(code, locals())
File "<string>", line 69, in <module>
File "/private/var/folders/kq/xgn53kss4qggy4z71lzwpgjc0000gn/T/pip-build-env-5k41opc9/overlay/lib/python3.10/site-packages/setuptools/__init__.py", line 107, in setup
return distutils.core.setup(**attrs)
File "/private/var/folders/kq/xgn53kss4qggy4z71lzwpgjc0000gn/T/pip-build-env-5k41opc9/overlay/lib/python3.10/site-packages/setuptools/_distutils/core.py", line 185, in setup
return run_commands(dist)
File "/private/var/folders/kq/xgn53kss4qggy4z71lzwpgjc0000gn/T/pip-build-env-5k41opc9/overlay/lib/python3.10/site-packages/setuptools/_distutils/core.py", line 201, in run_commands
dist.run_commands()
File "/private/var/folders/kq/xgn53kss4qggy4z71lzwpgjc0000gn/T/pip-build-env-5k41opc9/overlay/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 969, in run_commands
self.run_command(cmd)
File "/private/var/folders/kq/xgn53kss4qggy4z71lzwpgjc0000gn/T/pip-build-env-5k41opc9/overlay/lib/python3.10/site-packages/setuptools/dist.py", line 1234, in run_command
super().run_command(command)
File "/private/var/folders/kq/xgn53kss4qggy4z71lzwpgjc0000gn/T/pip-build-env-5k41opc9/overlay/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
cmd_obj.run()
File "/private/var/folders/kq/xgn53kss4qggy4z71lzwpgjc0000gn/T/pip-build-env-5k41opc9/overlay/lib/python3.10/site-packages/wheel/bdist_wheel.py", line 343, in run
self.run_command("build")
File "/private/var/folders/kq/xgn53kss4qggy4z71lzwpgjc0000gn/T/pip-build-env-5k41opc9/overlay/lib/python3.10/site-packages/setuptools/_distutils/cmd.py", line 318, in run_command
self.distribution.run_command(command)
File "/private/var/folders/kq/xgn53kss4qggy4z71lzwpgjc0000gn/T/pip-build-env-5k41opc9/overlay/lib/python3.10/site-packages/setuptools/dist.py", line 1234, in run_command
super().run_command(command)
File "/private/var/folders/kq/xgn53kss4qggy4z71lzwpgjc0000gn/T/pip-build-env-5k41opc9/overlay/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
cmd_obj.run()
File "/private/var/folders/kq/xgn53kss4qggy4z71lzwpgjc0000gn/T/pip-build-env-5k41opc9/overlay/lib/python3.10/site-packages/setuptools/_distutils/command/build.py", line 131, in run
self.run_command(cmd_name)
File "/private/var/folders/kq/xgn53kss4qggy4z71lzwpgjc0000gn/T/pip-build-env-5k41opc9/overlay/lib/python3.10/site-packages/setuptools/_distutils/cmd.py", line 318, in run_command
self.distribution.run_command(command)
File "/private/var/folders/kq/xgn53kss4qggy4z71lzwpgjc0000gn/T/pip-build-env-5k41opc9/overlay/lib/python3.10/site-packages/setuptools/dist.py", line 1234, in run_command
super().run_command(command)
File "/private/var/folders/kq/xgn53kss4qggy4z71lzwpgjc0000gn/T/pip-build-env-5k41opc9/overlay/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
cmd_obj.run()
File "<string>", line 28, in run
File "<string>", line 57, in build_extension
File "/Applications/Blender.app/Contents/Resources/3.5/python/lib/python3.10/subprocess.py", line 369, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['cmake', '--build', '.', '--target', '_morphio', '--config', 'Release']' returned non-zero exit status 1.
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for morphio
Failed to build morphio
ERROR: Could not build wheels for morphio, which is required to install pyproject.toml-based projects
Since it's not finding Python.h
, but
-isystem /Applications/Blender.app/Contents/Resources/3.5/python/include/python3.10
Is being used for python, I wonder if it's how Blender packages its python installation. Does that directory have a Python.h
file?
@mgeplf I will try it with the system Python 3.10 then.
@mgeplf I could also install it using the system python.
$ python3.10 -m pip install morphio
Defaulting to user installation because normal site-packages is not writeable
Collecting morphio
Using cached MorphIO-3.3.5.tar.gz (576 kB)
Installing build dependencies ... done
Getting requirements to build wheel ... done
Installing backend dependencies ... done
Preparing metadata (pyproject.toml) ... done
Requirement already satisfied: numpy>=1.14.1 in /Users/abdellah/Library/Python/3.10/lib/python/site-packages (from morphio) (1.25.0)
Building wheels for collected packages: morphio
Building wheel for morphio (pyproject.toml) ... done
Created wheel for morphio: filename=MorphIO-3.3.5-cp310-cp310-macosx_13_0_arm64.whl size=602763 sha256=90749f6f01cd7e0c6371fefd8c0b7128a966e6db3bacc6517a3c0bd6ae1efbc1
Stored in directory: /Users/abdellah/Library/Caches/pip/wheels/5b/8d/96/5175a7ffe58f3207a45b03eb81877e5c7dc69fb6c2ba28f7cb
Successfully built morphio
Installing collected packages: morphio
Successfully installed morphio-3.3.5
/Applications/Blender.app/Contents/Resources/3.5/python/include/python3.10 The directory does not have any Python.h file.
[ 12:05PM ] [ abdellah@tsf-500-wpa-3-255:/Applications/Blender.app/Contents/Resources/3.5/python/include/python3.10(system: ruby 2.6.10p210) ] $ ls pyconfig.h
That's a limitation in Blender then [https://github.com/pypa/setuptools/issues/3589]. I would then close the ticket. Thanks @mgeplf
No problem, glad we could figure it out. If/when I find time, I will try and have the build process create wheels, which would also probably solve this problem.