工作需要,下载 rknn-toolkit 开发套件时,需要事先进行python 环境配置,然后就遇到这个问题,卡了我好久。。。。。(还是自己菜,唉。)BUG具体如下:**
这是开始的命令,它就是BUG的潘多拉魔盒:
(venv) shopping1@ubuntu:~/rk3399pro_linux/external/rknn-toolkit/packages$ pip install -r ./requirements-cpu.txt
** 中间有很长一段是第三方库安装成功的记录,就不给你们看了,直接看BUG处吧,下面其实有大半都是红色字体,复制过来我不会弄,搞成全是一样的颜色了。:**
Using cached https://files.pythonhosted.org/packages/c0/4e/fd492e91abdc2d2fcb70ef453064d980688762079397f779758e055f6575/Markdown-3.1.1-py2.py3-none-any.whl
Building wheels for collected packages: lmdb
Building wheel for lmdb (setup.py) ... error
ERROR: Complete output from command /home/shopping1/venv/bin/python3 -u -c 'import setuptools, tokenize;__file__='"'"'/tmp/pip-install-vg8t53ai/lmdb/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 /tmp/pip-wheel-u2ozrkg_ --python-tag cp36:
ERROR: py-lmdb: Using bundled liblmdb; override with LMDB_FORCE_SYSTEM=1.
py-lmdb: Using CPython extension; override with LMDB_FORCE_CFFI=1.
running bdist_wheel
running build
running build_py
creating build
creating build/lib.linux-x86_64-3.6
creating build/lib.linux-x86_64-3.6/lmdb
copying lmdb/cffi.py -> build/lib.linux-x86_64-3.6/lmdb
copying lmdb/__main__.py -> build/lib.linux-x86_64-3.6/lmdb
copying lmdb/tool.py -> build/lib.linux-x86_64-3.6/lmdb
copying lmdb/_config.py -> build/lib.linux-x86_64-3.6/lmdb
copying lmdb/__init__.py -> build/lib.linux-x86_64-3.6/lmdb
running build_ext
building 'cpython' extension
creating build/temp.linux-x86_64-3.6
creating build/temp.linux-x86_64-3.6/lmdb
creating build/temp.linux-x86_64-3.6/lib
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -Ilib/py-lmdb -Ilib -I/usr/include/python3.6m -I/home/shopping1/venv/include/python3.6m -c lmdb/cpython.c -o build/temp.linux-x86_64-3.6/lmdb/cpython.o -UNDEBUG -w
lmdb/cpython.c:42:10: fatal error: Python.h: No such file or directory
#include "Python.h"
^~~~~~~~~~
compilation terminated.
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
----------------------------------------
ERROR: Failed building wheel for lmdb
Running setup.py clean for lmdb
Failed to build lmdb
Installing collected packages: lmdb, decorator, networkx, typing, typing-extensions, onnx, itsdangerous, MarkupSafe, Jinja2, click, Werkzeug, flask, dill, opencv-python, ruamel.yaml, wrapt, keras-applications, tensorflow-estimator, grpcio, gast, keras-preprocessing, absl-py, markdown, tensorboard, google-pasta, astor, termcolor, tensorflow
Running setup.py install for lmdb ... error
ERROR: Complete output from command /home/shopping1/venv/bin/python3 -u -c 'import setuptools, tokenize;__file__='"'"'/tmp/pip-install-vg8t53ai/lmdb/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"'