An error occurred when installing tflite-model-maker:
AttributeError Traceback (most recent call last)
d:\My Model\main.ipynb Cell 1 line 7
3 import os
5 # from tflite_model_maker.config import ExportFormat, QuantizationConfig
6 # from tflite_model_maker import model_spec
----> 7 from tflite_model_maker import object_detector
9 from tflite_support import metadata
11 import tensorflow as tf
File c:\Users\AlexTolstov\AppData\Local\Programs\Python\Python39\lib\site-packages\tflite_model_maker\__init__.py:44
1 # Copyright 2021 The TensorFlow Authors. All Rights Reserved.
2 #
3 # Licensed under the Apache License, Version 2.0 (the "License");
(...)
13 # limitations under the License.
14 # pylint: disable=g-bad-import-order,redefined-builtin
15 """Public APIs for TFLite Model Maker, a transfer learning library to train custom TFLite models.
16
17 You can install the package with
(...)
41 https://www.tensorflow.org/lite/guide/model_maker.
42 """
---> 44 from tflite_model_maker import audio_classifier
45 from tflite_model_maker import config
...
AttributeError: module 'numpy' has no attribute 'object'.
`np.object` was a deprecated alias for the builtin `object`. To avoid this error in existing code, use `object` by itself. Doing this will not modify any behavior and is safe.
The aliases was originally deprecated in NumPy 1.20; for more details and guidance see the original release note at:
https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations
I found a bug fix: pip install numpy==1.20.3 But then another error came out:
ImportError Traceback (most recent call last)
File c:\Users\AlexTolstov\AppData\Local\Programs\Python\Python39\lib\site-packages\pandas\__init__.py:50
48 try:
49 # numpy compat
---> 50 from pandas.compat import (
51 is_numpy_dev as _is_numpy_dev, # pyright: ignore[reportUnusedImport] # noqa: F401,E501
52 )
53 except ImportError as _err: # pragma: no cover
File c:\Users\AlexTolstov\AppData\Local\Programs\Python\Python39\lib\site-packages\pandas\compat\__init__.py:26
25 import pandas.compat.compressors
---> 26 from pandas.compat.numpy import is_numpy_dev
27 from pandas.compat.pyarrow import (
28 pa_version_under7p0,
29 pa_version_under8p0,
(...)
33 pa_version_under14p0,
34 )
File c:\Users\AlexTolstov\AppData\Local\Programs\Python\Python39\lib\site-packages\pandas\compat\numpy\__init__.py:17
16 if _nlv < Version(_min_numpy_ver):
---> 17 raise ImportError(
18 f"this version of pandas is incompatible with numpy < {_min_numpy_ver}\n"
19 f"your numpy version is {_np_version}.\n"
...
67 options,
68 )
70 # let init-time option registration happen
ImportError: C extension: None not built. If you want to import pandas from the source directory, you may need to run 'python setup.py build_ext' to build the C extensions first.
When I try to fix this error, the first error pops up again, and so on indefinitely Dear users, those who have encountered this error, please help
Python 3.9.0 Windows 11
I tried: pip install numpy==1.20.3
and fix second error