无法在Anaconda环境中安装tflite-model-maker的问题求助
解决Anaconda环境中安装tflite-model-maker的构建错误
执行以下命令安装tflite-model-maker时:
pip install tflite-model-maker
出现构建wheel失败的错误,核心报错为setuptools提示license_file参数已废弃,要求改用license_files,导致安装流程终止。
方案1:降级setuptools到兼容版本
新版setuptools强制废弃了license_file参数,但tflite-model-maker的部分依赖尚未适配。先降级setuptools再安装:
pip install setuptools==67.3.2 pip install tflite-model-maker
方案2:使用pip旧解析器绕过检查
通过指定参数让pip使用旧的依赖解析逻辑,忽略废弃参数的报错:
pip install tflite-model-maker --use-deprecated=legacy-resolver
方案3:源码安装(备选)
若前两种方法无效,可直接从GitHub源码安装:
git clone https://github.com/tensorflow/examples.git cd examples/tensorflow_examples/lite/model_maker/pip_package pip install -e .
内容的提问来源于stack exchange,提问作者Katharsia
相关产品推荐
相关产品推荐

