我一直在尝试在我的Anaconda环境中安装tflite支持包。以下是我遵循的步骤:
conda create --name test_env python==3.7
创建了一个新的python环境conda install tensorflow
安装tensorflow(因为pip安装在我的电脑上出现导入错误)pip install tflite-support
安装tflite支持包(conda安装抛出PackagesNotFoundError错误)以下代码段可用于重现错误:
import tensorflow as tf
from tflite_support import flatbuffers
from tflite_support import metadata as _metadata
from tflite_support import metadata_schema_py_generated as _metadata_fb
这会引发以下错误:
---------------------------------------------------------------------------
ImportError Traceback (most recent call last)
<ipython-input-4-37cdba048740> in <module>
----> 1 from tflite_support import flatbuffers
2 from tflite_support import metadata as _metadata
3 from tflite_support import metadata_schema_py_generated as _metadata_fb
c:\programdata\anaconda3\envs\testx\lib\site-packages\tflite_support\__init__.py in <module>
28
29 import flatbuffers as _flatbuffers
---> 30 from tensorflow_lite_support.metadata import metadata as _metadata
31 from tensorflow_lite_support.metadata import metadata_schema_py_generated as _metadata_schema_py_generated
32 from tensorflow_lite_support.metadata import schema_py_generated as _schema_py_generated
c:\programdata\anaconda3\envs\testx\lib\site-packages\tensorflow_lite_support\metadata\metadata.py in <module>
32 from tensorflow_lite_support.metadata import metadata_schema_py_generated as _metadata_fb
33 from tensorflow_lite_support.metadata import schema_py_generated as _schema_fb
---> 34 from tensorflow_lite_support.metadata.cc.python import _pywrap_metadata_version
35 from tensorflow_lite_support.metadata.flatbuffers_lib import _pywrap_flatbuffers
36
ImportError: DLL load failed: The specified module could not be found.
我尝试了不同版本的python、tensorflow&;tflite支持,但每次都会出现相同的错误。提前谢谢
我做的和你做的完全一样,但是我没有提到任何Python版本,它对我来说很好
我的python版本是
3.8.5
相关问题 更多 >
编程相关推荐