Hello,
I’m new to DLC and trying to lauch GUI on my M1 macbook air but it keeps failing:
(base) xxx@xxxMacBook-Air .idea % conda activate deeplabcut_M1
(deeplabcut_M1) xxx@xxxMacBook-Air .idea % python -m deeplabcut
RuntimeError: module compiled against API version 0x10 but this version of numpy is 0xf
RuntimeError: module compiled against API version 0x10 but this version of numpy is 0xf
ImportError: numpy.core._multiarray_umath failed to import
ImportError: numpy.core.umath failed to import
RuntimeError: module compiled against API version 0x10 but this version of numpy is 0xf
ImportError: numpy.core._multiarray_umath failed to import
ImportError: numpy.core.umath failed to import
RuntimeError: module compiled against API version 0x10 but this version of numpy is 0xf
ImportError: numpy.core._multiarray_umath failed to import
ImportError: numpy.core.umath failed to import
Traceback (most recent call last):
File “/Users/wangchang/miniconda3/envs/deeplabcut_M1/lib/python3.9/runpy.py”, line 188, in _run_module_as_main
mod_name, mod_spec, code = _get_module_details(mod_name, _Error)
File “/Users/wangchang/miniconda3/envs/deeplabcut_M1/lib/python3.9/runpy.py”, line 147, in _get_module_details
return _get_module_details(pkg_main_name, error)
File “/Users/wangchang/miniconda3/envs/deeplabcut_M1/lib/python3.9/runpy.py”, line 111, in _get_module_details
import
(pkg_name)
File “/Users/wangchang/Desktop/Y Zhang/DeepLabCut/deeplabcut/
init
.py”, line 16, in
import tensorflow as tf
File “/Users/wangchang/miniconda3/envs/deeplabcut_M1/lib/python3.9/site-packages/tensorflow/
init
.py”, line 37, in
from tensorflow.python.tools import module_util as _module_util
File “/Users/wangchang/miniconda3/envs/deeplabcut_M1/lib/python3.9/site-packages/tensorflow/python/
init
.py”, line 42, in
from tensorflow.python import data
File “/Users/wangchang/miniconda3/envs/deeplabcut_M1/lib/python3.9/site-packages/tensorflow/python/data/
init
.py”, line 21, in
from tensorflow.python.data import experimental
File “/Users/wangchang/miniconda3/envs/deeplabcut_M1/lib/python3.9/site-packages/tensorflow/python/data/experimental/
init
.py”, line 97, in
from tensorflow.python.data.experimental import service
File “/Users/wangchang/miniconda3/envs/deeplabcut_M1/lib/python3.9/site-packages/tensorflow/python/data/experimental/service/
init
.py”, line 419, in
from tensorflow.python.data.experimental.ops.data_service_ops import distribute
File “/Users/wangchang/miniconda3/envs/deeplabcut_M1/lib/python3.9/site-packages/tensorflow/python/data/experimental/ops/data_service_ops.py”, line 22, in
from tensorflow.python.data.experimental.ops import compression_ops
File “/Users/wangchang/miniconda3/envs/deeplabcut_M1/lib/python3.9/site-packages/tensorflow/python/data/experimental/ops/compression_ops.py”, line 16, in
from tensorflow.python.data.util import structure
File “/Users/wangchang/miniconda3/envs/deeplabcut_M1/lib/python3.9/site-packages/tensorflow/python/data/util/structure.py”, line 22, in
from tensorflow.python.data.util import nest
File “/Users/wangchang/miniconda3/envs/deeplabcut_M1/lib/python3.9/site-packages/tensorflow/python/data/util/nest.py”, line 34, in
from tensorflow.python.framework import sparse_tensor as _sparse_tensor
File “/Users/wangchang/miniconda3/envs/deeplabcut_M1/lib/python3.9/site-packages/tensorflow/python/framework/sparse_tensor.py”, line 25, in
from tensorflow.python.framework import constant_op
File “/Users/wangchang/miniconda3/envs/deeplabcut_M1/lib/python3.9/site-packages/tensorflow/python/framework/constant_op.py”, line 25, in
from tensorflow.python.eager import execute
File “/Users/wangchang/miniconda3/envs/deeplabcut_M1/lib/python3.9/site-packages/tensorflow/python/eager/execute.py”, line 21, in
from tensorflow.python.framework import dtypes
File “/Users/wangchang/miniconda3/envs/deeplabcut_M1/lib/python3.9/site-packages/tensorflow/python/framework/dtypes.py”, line 37, in
_np_bfloat16 = _pywrap_bfloat16.TF_bfloat16_type()
TypeError: Unable to convert function return value to a Python type! The signature was
() → handle
I am pretty much a noob in python and AI so may somebody help me? Thanks
David
Hello
@Benwei_Lu
and welcome
,
First, try updating NumPy.
You can do this with the command:
pip install --upgrade numpy
Make sure you activate your
deeplabcut_M1
environment before running this command.
I hope this helps! Happy DeepLabCutting🐭!
Cheers,
Installing collected packages: numpy
Attempting uninstall: numpy
Found existing installation: numpy 1.22.4
Uninstalling numpy-1.22.4:
Successfully uninstalled numpy-1.22.4
ERROR: pip’s dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
tensorflow-macos 2.12.0 requires numpy<1.24,>=1.22, but you have numpy 1.26.4 which is incompatible.
Successfully installed numpy-1.26.4
should I upgrade tensorflow or downgrade numpy?
I’m running into a similar issue as OP.
Downgrading tensorflow-macos and numpy leads to a subprocess error.
Upgrading numpy leads to a pytables error.
conda install pytables
installs 3.7 which is incompatible - it wants 3.8. So
conda install pytables=3.8
updates numpy (1.22.4), which recreates the original error.
I can’t find a fix.
Hello
@backyardbiomech
,
It sounds like you’re caught in a bit of a dependency conflict loop, which can be tricky sometimes.
To better help you, could you please provide the current versions of
numpy
,
tensorflow-macos
, and
pytables
you have installed? Also, detailing the specific errors and the steps you’ve already tried would be incredibly helpful.
Keep DeepLabCutting✨!
Cheers,