我一直在尝试使用pip安装tflite-support模块。我收到以下错误并被卡住。 我已经尝试过此link,但这并没有解决我的问题。我正在使用jupyter笔记本。并弹出“看起来您的帖子主要是代码;请添加更多详细信息”,这使我很烦。
pip install tflite-support==0.1.0a0
Collecting tflite-support==0.1.0a0
Using cached tflite-support-0.1.0a0.tar.gz (258 kB)
Requirement already satisfied: pybind11>=2.4 in c:\users\fleden\anaconda3\envs\liteee\lib\site-packages (from tflite-support==0.1.0a0) (2.4.0)
Requirement already satisfied: absl-py>=0.7.0 in c:\users\fleden\anaconda3\envs\liteee\lib\site-packages (from tflite-support==0.1.0a0) (0.9.0)
Requirement already satisfied: numpy in c:\users\fleden\anaconda3\envs\liteee\lib\site-packages (from tflite-support==0.1.0a0) (1.17.3)
Requirement already satisfied: six in c:\users\fleden\anaconda3\envs\liteee\lib\site-packages (from absl-py>=0.7.0->tflite-support==0.1.0a0) (1.14.0)
Building wheels for collected packages: tflite-support
Building wheel for tflite-support (setup.py) ... error
ERROR: Command errored out with exit status 1:
command: 'C:\Users\fleden\Anaconda3\envs\liteee\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\fleden\\AppData\\Local\\Temp\\pip-install-m125t_9x\\tflite-support\\setup.py'"'"'; __file__='"'"'C:\\Users\\fleden\\AppData\\Local\\Temp\\pip-install-m125t_9x\\tflite-support\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d 'C:\Users\fleden\AppData\Local\Temp\pip-wheel-tqlq_8kk'
cwd: C:\Users\fleden\AppData\Local\Temp\pip-install-m125t_9x\tflite-support\
Complete output (48 lines):
running bdist_wheel
running build
running build_py
creating build
creating build\lib.win-amd64-3.6
creating build\lib.win-amd64-3.6\tflite_support
copying tflite_support\codegen.py -> build\lib.win-amd64-3.6\tflite_support
copying tflite_support\metadata.py -> build\lib.win-amd64-3.6\tflite_support
copying tflite_support\metadata_schema_py_generated.py -> build\lib.win-amd64-3.6\tflite_support
copying tflite_support\schema_py_generated.py -> build\lib.win-amd64-3.6\tflite_support
copying tflite_support\__init__.py -> build\lib.win-amd64-3.6\tflite_support
running egg_info
writing tflite_support.egg-info\PKG-INFO
writing dependency_links to tflite_support.egg-info\dependency_links.txt
writing entry points to tflite_support.egg-info\entry_points.txt
writing requirements to tflite_support.egg-info\requires.txt
writing top-level names to tflite_support.egg-info\top_level.txt
reading manifest file 'tflite_support.egg-info\SOURCES.txt'
reading manifest template 'MANIFEST.in'
writing manifest file 'tflite_support.egg-info\SOURCES.txt'
copying tflite_support\metadata_schema.fbs -> build\lib.win-amd64-3.6\tflite_support
creating build\lib.win-amd64-3.6\tflite_support\flatbuffers
copying tflite_support\flatbuffers\__init__.py -> build\lib.win-amd64-3.6\tflite_support\flatbuffers
copying tflite_support\flatbuffers\builder.py -> build\lib.win-amd64-3.6\tflite_support\flatbuffers
copying tflite_support\flatbuffers\compat.py -> build\lib.win-amd64-3.6\tflite_support\flatbuffers
copying tflite_support\flatbuffers\encode.py -> build\lib.win-amd64-3.6\tflite_support\flatbuffers
copying tflite_support\flatbuffers\number_types.py -> build\lib.win-amd64-3.6\tflite_support\flatbuffers
copying tflite_support\flatbuffers\packer.py -> build\lib.win-amd64-3.6\tflite_support\flatbuffers
copying tflite_support\flatbuffers\table.py -> build\lib.win-amd64-3.6\tflite_support\flatbuffers
copying tflite_support\flatbuffers\util.py -> build\lib.win-amd64-3.6\tflite_support\flatbuffers
running build_ext
building '_pywrap_codegen' extension
creating build\temp.win-amd64-3.6
creating build\temp.win-amd64-3.6\Release
creating build\temp.win-amd64-3.6\Release\src
creating build\temp.win-amd64-3.6\Release\src\tensorflow
creating build\temp.win-amd64-3.6\Release\src\tensorflow\lite
creating build\temp.win-amd64-3.6\Release\src\tensorflow\lite\experimental
creating build\temp.win-amd64-3.6\Release\src\tensorflow\lite\experimental\support
creating build\temp.win-amd64-3.6\Release\src\tensorflow\lite\experimental\support\codegen
C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.25.28610\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -IC:\Users\fleden\Anaconda3\envs\liteee\Library\include -IC:\Users\fleden\Anaconda3\envs\liteee\Library\include -Iinclude -Isrc -IC:\Users\fleden\Anaconda3\envs\liteee\include -IC:\Users\fleden\Anaconda3\envs\liteee\include "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.25.28610\ATLMFC\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.25.28610\include" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\include\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\ucrt" /EHsc /Tpsrc\tensorflow\lite\experimental\support\codegen\android_java_generator.cc /Fobuild\temp.win-amd64-3.6\Release\src\tensorflow\lite\experimental\support\codegen\android_java_generator.obj /EHsc /DVERSION_INFO=\"0.1.0a0\"
android_java_generator.cc
src\tensorflow\lite\experimental\support\codegen\android_java_generator.cc(157): warning C4018: '<': signed/unsigned mismatch
src\tensorflow\lite\experimental\support\codegen\android_java_generator.cc(162): warning C4018: '<': signed/unsigned mismatch
C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.25.28610\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -IC:\Users\fleden\Anaconda3\envs\liteee\Library\include -IC:\Users\fleden\Anaconda3\envs\liteee\Library\include -Iinclude -Isrc -IC:\Users\fleden\Anaconda3\envs\liteee\include -IC:\Users\fleden\Anaconda3\envs\liteee\include "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.25.28610\ATLMFC\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.25.28610\include" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\include\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\ucrt" /EHsc /Tpsrc\tensorflow\lite\experimental\support\codegen\codegen_lib.cc /Fobuild\temp.win-amd64-3.6\Release\src\tensorflow\lite\experimental\support\codegen\codegen_lib.obj /EHsc /DVERSION_INFO=\"0.1.0a0\"
codegen_lib.cc
C:\Users\fleden\Anaconda3\envs\liteee\include\pyconfig.h(222): fatal error C1083: Cannot open include file: 'basetsd.h': No such file or directory
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\BuildTools\\VC\\Tools\\MSVC\\14.25.28610\\bin\\HostX86\\x64\\cl.exe' failed with exit status 2
----------------------------------------
ERROR: Failed building wheel for tflite-support
Running setup.py clean for tflite-support
Failed to build tflite-support
Installing collected packages: tflite-support
Running setup.py install for tflite-support ... error
ERROR: Command errored out with exit status 1:
command: 'C:\Users\fleden\Anaconda3\envs\liteee\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\fleden\\AppData\\Local\\Temp\\pip-install-m125t_9x\\tflite-support\\setup.py'"'"'; __file__='"'"'C:\\Users\\fleden\\AppData\\Local\\Temp\\pip-install-m125t_9x\\tflite-support\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\fleden\AppData\Local\Temp\pip-record-46ao33cw\install-record.txt' --single-version-externally-managed --compile --install-headers 'C:\Users\fleden\Anaconda3\envs\liteee\Include\tflite-support'
cwd: C:\Users\fleden\AppData\Local\Temp\pip-install-m125t_9x\tflite-support\
Complete output (48 lines):
running install
running build
running build_py
creating build
creating build\lib.win-amd64-3.6
creating build\lib.win-amd64-3.6\tflite_support
copying tflite_support\codegen.py -> build\lib.win-amd64-3.6\tflite_support
copying tflite_support\metadata.py -> build\lib.win-amd64-3.6\tflite_support
copying tflite_support\metadata_schema_py_generated.py -> build\lib.win-amd64-3.6\tflite_support
copying tflite_support\schema_py_generated.py -> build\lib.win-amd64-3.6\tflite_support
copying tflite_support\__init__.py -> build\lib.win-amd64-3.6\tflite_support
running egg_info
writing tflite_support.egg-info\PKG-INFO
writing dependency_links to tflite_support.egg-info\dependency_links.txt
writing entry points to tflite_support.egg-info\entry_points.txt
writing requirements to tflite_support.egg-info\requires.txt
writing top-level names to tflite_support.egg-info\top_level.txt
reading manifest file 'tflite_support.egg-info\SOURCES.txt'
reading manifest template 'MANIFEST.in'
writing manifest file 'tflite_support.egg-info\SOURCES.txt'
copying tflite_support\metadata_schema.fbs -> build\lib.win-amd64-3.6\tflite_support
creating build\lib.win-amd64-3.6\tflite_support\flatbuffers
copying tflite_support\flatbuffers\__init__.py -> build\lib.win-amd64-3.6\tflite_support\flatbuffers
copying tflite_support\flatbuffers\builder.py -> build\lib.win-amd64-3.6\tflite_support\flatbuffers
copying tflite_support\flatbuffers\compat.py -> build\lib.win-amd64-3.6\tflite_support\flatbuffers
copying tflite_support\flatbuffers\encode.py -> build\lib.win-amd64-3.6\tflite_support\flatbuffers
copying tflite_support\flatbuffers\number_types.py -> build\lib.win-amd64-3.6\tflite_support\flatbuffers
copying tflite_support\flatbuffers\packer.py -> build\lib.win-amd64-3.6\tflite_support\flatbuffers
copying tflite_support\flatbuffers\table.py -> build\lib.win-amd64-3.6\tflite_support\flatbuffers
copying tflite_support\flatbuffers\util.py -> build\lib.win-amd64-3.6\tflite_support\flatbuffers
running build_ext
building '_pywrap_codegen' extension
creating build\temp.win-amd64-3.6
creating build\temp.win-amd64-3.6\Release
creating build\temp.win-amd64-3.6\Release\src
creating build\temp.win-amd64-3.6\Release\src\tensorflow
creating build\temp.win-amd64-3.6\Release\src\tensorflow\lite
creating build\temp.win-amd64-3.6\Release\src\tensorflow\lite\experimental
creating build\temp.win-amd64-3.6\Release\src\tensorflow\lite\experimental\support
creating build\temp.win-amd64-3.6\Release\src\tensorflow\lite\experimental\support\codegen
C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.25.28610\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -IC:\Users\fleden\Anaconda3\envs\liteee\Library\include -IC:\Users\fleden\Anaconda3\envs\liteee\Library\include -Iinclude -Isrc -IC:\Users\fleden\Anaconda3\envs\liteee\include -IC:\Users\fleden\Anaconda3\envs\liteee\include "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.25.28610\ATLMFC\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.25.28610\include" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\include\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\ucrt" /EHsc /Tpsrc\tensorflow\lite\experimental\support\codegen\android_java_generator.cc /Fobuild\temp.win-amd64-3.6\Release\src\tensorflow\lite\experimental\support\codegen\android_java_generator.obj /EHsc /DVERSION_INFO=\"0.1.0a0\"
android_java_generator.cc
src\tensorflow\lite\experimental\support\codegen\android_java_generator.cc(157): warning C4018: '<': signed/unsigned mismatch
src\tensorflow\lite\experimental\support\codegen\android_java_generator.cc(162): warning C4018: '<': signed/unsigned mismatch
C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.25.28610\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -IC:\Users\fleden\Anaconda3\envs\liteee\Library\include -IC:\Users\fleden\Anaconda3\envs\liteee\Library\include -Iinclude -Isrc -IC:\Users\fleden\Anaconda3\envs\liteee\include -IC:\Users\fleden\Anaconda3\envs\liteee\include "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.25.28610\ATLMFC\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.25.28610\include" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\include\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\ucrt" /EHsc /Tpsrc\tensorflow\lite\experimental\support\codegen\codegen_lib.cc /Fobuild\temp.win-amd64-3.6\Release\src\tensorflow\lite\experimental\support\codegen\codegen_lib.obj /EHsc /DVERSION_INFO=\"0.1.0a0\"
codegen_lib.cc
C:\Users\fleden\Anaconda3\envs\liteee\include\pyconfig.h(222): fatal error C1083: Cannot open include file: 'basetsd.h': No such file or directory
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\BuildTools\\VC\\Tools\\MSVC\\14.25.28610\\bin\\HostX86\\x64\\cl.exe' failed with exit status 2
----------------------------------------
ERROR: Command errored out with exit status 1: 'C:\Users\fleden\Anaconda3\envs\liteee\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\fleden\\AppData\\Local\\Temp\\pip-install-m125t_9x\\tflite-support\\setup.py'"'"'; __file__='"'"'C:\\Users\\fleden\\AppData\\Local\\Temp\\pip-install-m125t_9x\\tflite-support\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\fleden\AppData\Local\Temp\pip-record-46ao33cw\install-record.txt' --single-version-externally-managed --compile --install-headers 'C:\Users\fleden\Anaconda3\envs\liteee\Include\tflite-support' Check the logs for full command output.