2

I got an error while trying to install plyvel on my raspberry (pi 3 B+) with sudo pip install plyvel :


Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Collecting plyvel
  Using cached https://files.pythonhosted.org/packages/b3/1d/05e3555abddb49b9a2f3aa1268bec4933bf377ffcad3c1b2630fcfa597eb/plyvel-1.0.5.tar.gz
Building wheels for collected packages: plyvel
  Building wheel for plyvel (setup.py) ... error
  Complete output from command /usr/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-6UieGu/plyvel/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-07KIhZ --python-tag cp27:
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build/lib.linux-armv7l-2.7
  creating build/lib.linux-armv7l-2.7/plyvel
  copying plyvel/__init__.py -> build/lib.linux-armv7l-2.7/plyvel
  copying plyvel/_version.py -> build/lib.linux-armv7l-2.7/plyvel
  running build_ext
  building 'plyvel._plyvel' extension
  creating build/temp.linux-armv7l-2.7
  creating build/temp.linux-armv7l-2.7/plyvel
  arm-linux-gnueabihf-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -Wdate-time -D_FORTIFY_SOURCE=2 -g -fdebug-prefix-map=/build/python2.7-Ub3vap/python2.7-2.7.13=. -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I/usr/include/python2.7 -c plyvel/_plyvel.cpp -o build/temp.linux-armv7l-2.7/plyvel/_plyvel.o -Wall -g
  cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
  plyvel/_plyvel.cpp:589:24: fatal error: leveldb/db.h: No such file or directory
   #include "leveldb/db.h"
                          ^
  compilation terminated.
  error: command 'arm-linux-gnueabihf-gcc' failed with exit status 1

  ----------------------------------------
  Failed building wheel for plyvel
  Running setup.py clean for plyvel
Failed to build plyvel
Installing collected packages: plyvel
  Running setup.py install for plyvel ... error
    Complete output from command /usr/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-6UieGu/plyvel/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-record-GikxjL/install-record.txt --single-version-externally-managed --compile:
    running install
    running build
    running build_py
    creating build
    creating build/lib.linux-armv7l-2.7
    creating build/lib.linux-armv7l-2.7/plyvel
    copying plyvel/__init__.py -> build/lib.linux-armv7l-2.7/plyvel
    copying plyvel/_version.py -> build/lib.linux-armv7l-2.7/plyvel
    running build_ext
    building 'plyvel._plyvel' extension
    creating build/temp.linux-armv7l-2.7
    creating build/temp.linux-armv7l-2.7/plyvel
    arm-linux-gnueabihf-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -Wdate-time -D_FORTIFY_SOURCE=2 -g -fdebug-prefix-map=/build/python2.7-Ub3vap/python2.7-2.7.13=. -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I/usr/include/python2.7 -c plyvel/_plyvel.cpp -o build/temp.linux-armv7l-2.7/plyvel/_plyvel.o -Wall -g
    cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
    plyvel/_plyvel.cpp:589:24: fatal error: leveldb/db.h: No such file or directory
     #include "leveldb/db.h"
                            ^
    compilation terminated.
    error: command 'arm-linux-gnueabihf-gcc' failed with exit status 1

    ----------------------------------------
Command "/usr/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-6UieGu/plyvel/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-record-GikxjL/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-install-6UieGu/plyvel/

I trying to install some important dependancies apt-get install gcc python-dev libboost-python-dev libboost-thread-dev

On the compilation it seem not found a file on his own package, weird : plyvel/_plyvel.cpp:589:24: fatal error: leveldb/db.h: No such file or directory

So, I have installed sudo apt-get install python-leveldb to have a build of leveldb, nothing new.

Maybe I have to post this issue directly in the plyvel repository but I don't even know first if there is a missing dependancies on the raspberry first. Any idea ?

Thanks for your help & have a good day !

EDIT:

Have a new error after install some package, as the oficial documentation recommended (read the doc, read the doc !) : apt-get install libleveldb1v5 libleveldb-dev.

    arm-linux-gnueabihf-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -Wdate-time -D_FORTIFY_SOURCE=2 -g -fdebug-prefix-map=/build/python2.7-Ub3vap/python2.7-2.7.13=. -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I/usr/include/python2.7 -c plyvel/_plyvel.cpp -o build/temp.linux-armv7l-2.7/plyvel/_plyvel.o -Wall -g
    cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
    plyvel/_plyvel.cpp: In function ‘int __pyx_f_6plyvel_7_plyvel_parse_options(leveldb::Options*, bool, bool, PyObject*, PyObject*, PyObject*, PyObject*, PyObject*, PyObject*, PyObject*, PyObject*, int, PyObject*, PyObject*)’:
    plyvel/_plyvel.cpp:3401:22: error: ‘struct leveldb::Options’ has no member named ‘max_file_size’; did you mean ‘max_open_files’?
         __pyx_v_options->max_file_size = __pyx_t_4;
                          ^~~~~~~~~~~~~
    error: command 'arm-linux-gnueabihf-gcc' failed with exit status 1

2

Since plyvel 1.0.0, the minimum leveldb version is 1.20. You're using an older version.

See the version history for details: https://plyvel.readthedocs.io/en/latest/news.html#plyvel-1-0-0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.