I am using TINerator to create meshes from digital elevation models, but am unable to import tinerator into the jupyter notebook (using within a conda environment) on macOS due to the fact that the required richdem package fails to build.
I tried updating pip, installing from the terminal instead of in jupyter notebook, and installing wheel, but the same error remains. The output from pip install richdem is included below
Collecting richdem
Using cached richdem-0.3.4.tar.gz (329 kB)
Preparing metadata (setup.py) ... done
Requirement already satisfied: numpy<2,>=1.7 in ./anaconda3/envs/tinerator/lib/python3.11/site-packages/numpy-1.26.0b1-py3.11-macosx-11.1-arm64.egg (from richdem) (1.26.0b1)
Building wheels for collected packages: richdem
Building wheel for richdem (setup.py) ... error
error: subprocess-exited-with-error
× python setup.py bdist_wheel did not run successfully.
│ exit code: 1
╰─> [391 lines of output]
Using RichDEM hash=Unknown, time=Unknown
/Users/ashleigh/anaconda3/envs/tinerator/lib/python3.11/site-packages/setuptools/dist.py:745: SetuptoolsDeprecationWarning: Invalid dash-separated options
!!
********************************************************************************
Usage of dash-separated 'description-file' will not be supported in future
versions. Please use the underscore name 'description_file' instead.
By 2023-Sep-26, you need to update your project and remove deprecated calls
or your builds will no longer be supported.
See https://setuptools.pypa.io/en/latest/userguide/declarative_config.html for details.
********************************************************************************
!!
opt = self.warn_dash_deprecation(opt, section)
........
^
/Users/ashleigh/anaconda3/envs/tinerator/include/python3.11/pythread.h:96:1: note: 'PyThread_create_key' has been explicitly marked deprecated here
Py_DEPRECATED(3.7) PyAPI_FUNC(int) PyThread_create_key(void);
^
/Users/ashleigh/anaconda3/envs/tinerator/include/python3.11/pyport.h:336:54: note: expanded from macro 'Py_DEPRECATED'
#define Py_DEPRECATED(VERSION_UNUSED) __attribute__((__deprecated__))
^
In file included from src/pywrapper.cpp:1:
In file included from lib/pybind11/pybind11.h:43:
In file included from lib/pybind11/attr.h:13:
In file included from lib/pybind11/cast.h:16:
lib/pybind11/detail/internals.h:165:9: warning: 'PyEval_InitThreads' is deprecated [-Wdeprecated-declarations]
PyEval_InitThreads();
^
/Users/ashleigh/anaconda3/envs/tinerator/include/python3.11/ceval.h:132:1: note: 'PyEval_InitThreads' has been explicitly marked deprecated here
Py_DEPRECATED(3.9) PyAPI_FUNC(void) PyEval_InitThreads(void);
^
/Users/ashleigh/anaconda3/envs/tinerator/include/python3.11/pyport.h:336:54: note: expanded from macro 'Py_DEPRECATED'
#define Py_DEPRECATED(VERSION_UNUSED) __attribute__((__deprecated__))
^
In file included from src/pywrapper.cpp:1:
In file included from lib/pybind11/pybind11.h:43:
In file included from lib/pybind11/attr.h:13:
In file included from lib/pybind11/cast.h:16:
lib/pybind11/detail/internals.h:167:33: warning: 'PyThread_create_key' is deprecated [-Wdeprecated-declarations]
internals_ptr->tstate = PyThread_create_key();
^
/Users/ashleigh/anaconda3/envs/tinerator/include/python3.11/pythread.h:96:1: note: 'PyThread_create_key' has been explicitly marked deprecated here
Py_DEPRECATED(3.7) PyAPI_FUNC(int) PyThread_create_key(void);
^
/Users/ashleigh/anaconda3/envs/tinerator/include/python3.11/pyport.h:336:54: note: expanded from macro 'Py_DEPRECATED'
#define Py_DEPRECATED(VERSION_UNUSED) __attribute__((__deprecated__))
^
In file included from src/pywrapper.cpp:1:
In file included from lib/pybind11/pybind11.h:43:
In file included from lib/pybind11/attr.h:13:
In file included from lib/pybind11/cast.h:16:
lib/pybind11/detail/internals.h:168:9: warning: 'PyThread_set_key_value' is deprecated [-Wdeprecated-declarations]
PyThread_set_key_value(internals_ptr->tstate, tstate);
^
/Users/ashleigh/anaconda3/envs/tinerator/include/python3.11/pythread.h:98:1: note: 'PyThread_set_key_value' has been explicitly marked deprecated here
Py_DEPRECATED(3.7) PyAPI_FUNC(int) PyThread_set_key_value(int key,
^
/Users/ashleigh/anaconda3/envs/tinerator/include/python3.11/pyport.h:336:54: note: expanded from macro 'Py_DEPRECATED'
#define Py_DEPRECATED(VERSION_UNUSED) __attribute__((__deprecated__))
^
In file included from src/pywrapper.cpp:1:
In file included from lib/pybind11/pybind11.h:43:
In file included from lib/pybind11/attr.h:13:
lib/pybind11/cast.h:441:36: error: member access into incomplete type 'PyFrameObject' (aka '_frame')
" " + handle(frame->f_code->co_filename).cast<std::string>() +
^
/Users/ashleigh/anaconda3/envs/tinerator/include/python3.11/pytypedefs.h:22:16: note: forward declaration of '_frame'
typedef struct _frame PyFrameObject;
^
In file included from src/pywrapper.cpp:1:
In file included from lib/pybind11/pybind11.h:43:
In file included from lib/pybind11/attr.h:13:
lib/pybind11/cast.h:443:29: error: member access into incomplete type 'PyFrameObject' (aka '_frame')
handle(frame->f_code->co_name).cast<std::string>() + "\n";
^
/Users/ashleigh/anaconda3/envs/tinerator/include/python3.11/pytypedefs.h:22:16: note: forward declaration of '_frame'
typedef struct _frame PyFrameObject;
^
In file included from src/pywrapper.cpp:1:
In file included from lib/pybind11/pybind11.h:43:
In file included from lib/pybind11/attr.h:13:
lib/pybind11/cast.h:444:26: error: member access into incomplete type 'PyFrameObject' (aka '_frame')
frame = frame->f_back;
^
/Users/ashleigh/anaconda3/envs/tinerator/include/python3.11/pytypedefs.h:22:16: note: forward declaration of '_frame'
typedef struct _frame PyFrameObject;
^
In file included from src/pywrapper.cpp:1:
lib/pybind11/pybind11.h:1741:36: warning: 'PyThread_get_key_value' is deprecated [-Wdeprecated-declarations]
tstate = (PyThreadState *) PyThread_get_key_value(internals.tstate);
^
/Users/ashleigh/anaconda3/envs/tinerator/include/python3.11/pythread.h:100:1: note: 'PyThread_get_key_value' has been explicitly marked deprecated here
Py_DEPRECATED(3.7) PyAPI_FUNC(void *) PyThread_get_key_value(int key);
^
/Users/ashleigh/anaconda3/envs/tinerator/include/python3.11/pyport.h:336:54: note: expanded from macro 'Py_DEPRECATED'
#define Py_DEPRECATED(VERSION_UNUSED) __attribute__((__deprecated__))
^
In file included from src/pywrapper.cpp:1:
lib/pybind11/pybind11.h:1753:13: warning: 'PyThread_set_key_value' is deprecated [-Wdeprecated-declarations]
PyThread_set_key_value(internals.tstate, tstate);
^
/Users/ashleigh/anaconda3/envs/tinerator/include/python3.11/pythread.h:98:1: note: 'PyThread_set_key_value' has been explicitly marked deprecated here
Py_DEPRECATED(3.7) PyAPI_FUNC(int) PyThread_set_key_value(int key,
^
/Users/ashleigh/anaconda3/envs/tinerator/include/python3.11/pyport.h:336:54: note: expanded from macro 'Py_DEPRECATED'
#define Py_DEPRECATED(VERSION_UNUSED) __attribute__((__deprecated__))
^
In file included from src/pywrapper.cpp:1:
lib/pybind11/pybind11.h:1792:13: warning: 'PyThread_delete_key_value' is deprecated [-Wdeprecated-declarations]
PyThread_delete_key_value(detail::get_internals().tstate);
^
/Users/ashleigh/anaconda3/envs/tinerator/include/python3.11/pythread.h:101:1: note: 'PyThread_delete_key_value' has been explicitly marked deprecated here
Py_DEPRECATED(3.7) PyAPI_FUNC(void) PyThread_delete_key_value(int key);
^
/Users/ashleigh/anaconda3/envs/tinerator/include/python3.11/pyport.h:336:54: note: expanded from macro 'Py_DEPRECATED'
#define Py_DEPRECATED(VERSION_UNUSED) __attribute__((__deprecated__))
^
In file included from src/pywrapper.cpp:1:
lib/pybind11/pybind11.h:1820:17: warning: 'PyThread_set_key_value' is deprecated [-Wdeprecated-declarations]
PyThread_set_key_value(key, nullptr);
^
/Users/ashleigh/anaconda3/envs/tinerator/include/python3.11/pythread.h:98:1: note: 'PyThread_set_key_value' has been explicitly marked deprecated here
Py_DEPRECATED(3.7) PyAPI_FUNC(int) PyThread_set_key_value(int key,
^
/Users/ashleigh/anaconda3/envs/tinerator/include/python3.11/pyport.h:336:54: note: expanded from macro 'Py_DEPRECATED'
#define Py_DEPRECATED(VERSION_UNUSED) __attribute__((__deprecated__))
^
In file included from src/pywrapper.cpp:1:
lib/pybind11/pybind11.h:1833:13: warning: 'PyThread_set_key_value' is deprecated [-Wdeprecated-declarations]
PyThread_set_key_value(key, tstate);
^
/Users/ashleigh/anaconda3/envs/tinerator/include/python3.11/pythread.h:98:1: note: 'PyThread_set_key_value' has been explicitly marked deprecated here
Py_DEPRECATED(3.7) PyAPI_FUNC(int) PyThread_set_key_value(int key,
^
/Users/ashleigh/anaconda3/envs/tinerator/include/python3.11/pyport.h:336:54: note: expanded from macro 'Py_DEPRECATED'
#define Py_DEPRECATED(VERSION_UNUSED) __attribute__((__deprecated__))
^
In file included from src/pywrapper.cpp:1:
lib/pybind11/pybind11.h:1890:49: error: no member named 'frame' in '_ts'
PyFrameObject *frame = PyThreadState_Get()->frame;
~~~~~~~~~~~~~~~~~~~ ^
lib/pybind11/pybind11.h:1891:41: error: member access into incomplete type 'PyFrameObject' (aka '_frame')
if (frame && (std::string) str(frame->f_code->co_name) == name &&
^
/Users/ashleigh/anaconda3/envs/tinerator/include/python3.11/pytypedefs.h:22:16: note: forward declaration of '_frame'
typedef struct _frame PyFrameObject;
^
In file included from src/pywrapper.cpp:1:
lib/pybind11/pybind11.h:1892:14: error: member access into incomplete type 'PyFrameObject' (aka '_frame')
frame->f_code->co_argcount > 0) {
^
/Users/ashleigh/anaconda3/envs/tinerator/include/python3.11/pytypedefs.h:22:16: note: forward declaration of '_frame'
typedef struct _frame PyFrameObject;
^
In file included from src/pywrapper.cpp:1:
lib/pybind11/pybind11.h:1895:18: error: member access into incomplete type 'PyFrameObject' (aka '_frame')
frame->f_locals, PyTuple_GET_ITEM(frame->f_code->co_varnames, 0));
^
/Users/ashleigh/anaconda3/envs/tinerator/include/python3.11/pytypedefs.h:22:16: note: forward declaration of '_frame'
typedef struct _frame PyFrameObject;
^
In file included from src/pywrapper.cpp:1:
lib/pybind11/pybind11.h:1895:52: error: member access into incomplete type 'PyFrameObject' (aka '_frame')
frame->f_locals, PyTuple_GET_ITEM(frame->f_code->co_varnames, 0));
^
/Users/ashleigh/anaconda3/envs/tinerator/include/python3.11/pytypedefs.h:22:16: note: forward declaration of '_frame'
typedef struct _frame PyFrameObject;
^
In file included from src/pywrapper.cpp:2:
In file included from lib/richdem/depressions/depressions.hpp:7:
lib/richdem/depressions/Wei2018.hpp:170:7: warning: unused variable 'numberofall' [-Wunused-variable]
int numberofall = 0;
^
lib/richdem/depressions/Wei2018.hpp:171:7: warning: unused variable 'numberofright' [-Wunused-variable]
int numberofright = 0;
^
In file included from src/pywrapper.cpp:1:
lib/pybind11/pybind11.h:1062:9: warning: expression result unused [-Wunused-value]
PYBIND11_EXPAND_SIDE_EFFECTS(add_base<options>(record));
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
lib/pybind11/detail/common.h:648:47: note: expanded from macro 'PYBIND11_EXPAND_SIDE_EFFECTS'
#define PYBIND11_EXPAND_SIDE_EFFECTS(PATTERN) pybind11::detail::expand_side_effects{ ((PATTERN), void(), false)..., false }
........
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/pywrapper.cpp:195:3: note: in instantiation of function template specialization 'pybind11::class_<richdem::Array3D<float>>::class_<pybind11::buffer_protocol, pybind11::dynamic_attr>' requested here
py::class_<Array3D<float>>(m, "Array3D_float", py::buffer_protocol(), py::dynamic_attr())
^
25 warnings and 8 errors generated.
error: command '/usr/bin/clang' failed with exit code 1
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for richdem
Running setup.py clean for richdem
Failed to build richdem
ERROR: Could not build wheels for richdem, which is required to install pyproject.toml-based projects