[英]Unable to Import tflite-support package. Receiving error "DLL load failed: The specified module could not be found"
我一直在嘗試在我的 Anaconda 環境中安裝 tflite-support 包。 這些是我遵循的步驟:
conda create --name test_env python==3.7
創建了一個新的 python 環境conda install tensorflow
(因為 pip install 在我的 PC 上出現導入錯誤)pip install tflite-support
包(conda install 拋出 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-support,但每次都遇到相同的錯誤。 提前致謝!
我和你做的完全一樣,但我沒有提到任何 Python 版本,它對我來說很好用。
我的python版本是3.8.5
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.