`` 当我从 deepface import DeepFace 或 import tensorflow 尝试运行任何东西时,会弹出此错误。最初,当我尝试使用 pip 安装 deepface 时,我会收到此处显示的错误无法安装 deepface,因为包版本存在冲突。在尝试使用这篇文章 How to Install Deepface (Python Face Recognition Package) on M1 Mac? 上显示的答案安装它之后? 我开始遇到上面的错误。这是我第一次在这里发布问题,如果我没有提供一些有助于解决此问题的信息,我深表歉意。我还尝试从 https://developer.apple.com/metal/tensorflow-plugin/ 重新安装 tensorcore 并使用 pip 安装 deepface 仍然给我这里显示的错误无法安装 deepface 因为包版本有冲突.
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/sammah/Desktop/Conda_Test/main.py", line 1, in \<module\>
from deepface import DeepFace
File "/Users/sammah/anaconda3/envs/Conda_Env/lib/python3.10/site-packages/deepface/DeepFace.py", line 14, in \<module\>
import tensorflow as tf
File "/Users/sammah/anaconda3/envs/Conda_Env/lib/python3.10/site-packages/tensorflow/__init__.py", line 37, in \<module\>
from tensorflow.python.tools import module_util as \_module_util
File "/Users/sammah/anaconda3/envs/Conda_Env/lib/python3.10/site-packages/tensorflow/python/__init__.py", line 42, in \<module\>
from tensorflow.python import data
File "/Users/sammah/anaconda3/envs/Conda_Env/lib/python3.10/site-packages/tensorflow/python/data/__init__.py", line 21, in \<module\>
from tensorflow.python.data import experimental
File "/Users/sammah/anaconda3/envs/Conda_Env/lib/python3.10/site-packages/tensorflow/python/data/experimental/__init__.py", line 97, in \<module\>
from tensorflow.python.data.experimental import service
File "/Users/sammah/anaconda3/envs/Conda_Env/lib/python3.10/site-packages/tensorflow/python/data/experimental/service/__init__.py", line 419, in \<module\>
from tensorflow.python.data.experimental.ops.data_service_ops import distribute
File "/Users/sammah/anaconda3/envs/Conda_Env/lib/python3.10/site-packages/tensorflow/python/data/experimental/ops/data_service_ops.py", line 22, in \<module\>
from tensorflow.python.data.experimental.ops import compression_ops
File "/Users/sammah/anaconda3/envs/Conda_Env/lib/python3.10/site-packages/tensorflow/python/data/experimental/ops/compression_ops.py", line 16, in \<module\>
from tensorflow.python.data.util import structure
File "/Users/sammah/anaconda3/envs/Conda_Env/lib/python3.10/site-packages/tensorflow/python/data/util/structure.py", line 22, in \<module\>
from tensorflow.python.data.util import nest
File "/Users/sammah/anaconda3/envs/Conda_Env/lib/python3.10/site-packages/tensorflow/python/data/util/nest.py", line 34, in \<module\>
from tensorflow.python.framework import sparse_tensor as \_sparse_tensor
File "/Users/sammah/anaconda3/envs/Conda_Env/lib/python3.10/site-packages/tensorflow/python/framework/sparse_tensor.py", line 25, in \<module\>
from tensorflow.python.framework import constant_op
File "/Users/sammah/anaconda3/envs/Conda_Env/lib/python3.10/site-packages/tensorflow/python/framework/constant_op.py", line 25, in \<module\>
from tensorflow.python.eager import execute
File "/Users/sammah/anaconda3/envs/Conda_Env/lib/python3.10/site-packages/tensorflow/python/eager/execute.py", line 21, in \<module\>
from tensorflow.python.framework import dtypes
File "/Users/sammah/anaconda3/envs/Conda_Env/lib/python3.10/site-packages/tensorflow/python/framework/dtypes.py", line 37, in \<module\>
\_np_bfloat16 = \_pywrap_bfloat16.TF_bfloat16_type()
TypeError: Unable to convert function return value to a Python type! The signature was
() -\> handle
Process finished with exit code 1