2

我按照这里的说明进行操作:http: //pyrocksdb.readthedocs.org/en/latest/installation.html

当我尝试时,pip install git+git://github.com/stephan-hof/pyrocksdb.git我得到以下错误输出:

running install

running build

running build_py

creating build

creating build/lib.linux-x86_64-3.4

creating build/lib.linux-x86_64-3.4/rocksdb

copying rocksdb/__init__.py -> build/lib.linux-x86_64-3.4/rocksdb

copying rocksdb/interfaces.py -> build/lib.linux-x86_64-3.4/rocksdb

copying rocksdb/errors.py -> build/lib.linux-x86_64-3.4/rocksdb

creating build/lib.linux-x86_64-3.4/rocksdb/tests

copying rocksdb/tests/__init__.py -> build/lib.linux-x86_64-3.4/rocksdb/tests

copying rocksdb/tests/test_db.py -> build/lib.linux-x86_64-3.4/rocksdb/tests

copying rocksdb/tests/test_options.py -> build/lib.linux-x86_64-3.4/rocksdb/tests

running egg_info

creating pyrocksdb.egg-info

writing dependency_links to pyrocksdb.egg-info/dependency_links.txt

writing top-level names to pyrocksdb.egg-info/top_level.txt

writing requirements to pyrocksdb.egg-info/requires.txt

writing pyrocksdb.egg-info/PKG-INFO

writing manifest file 'pyrocksdb.egg-info/SOURCES.txt'

warning: manifest_maker: standard file '-c' not found



reading manifest file 'pyrocksdb.egg-info/SOURCES.txt'

writing manifest file 'pyrocksdb.egg-info/SOURCES.txt'

copying rocksdb/_rocksdb.cpp -> build/lib.linux-x86_64-3.4/rocksdb

running build_ext

building 'rocksdb._rocksdb' extension

creating build/temp.linux-x86_64-3.4

creating build/temp.linux-x86_64-3.4/rocksdb

x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -g -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -fPIC -I/home/iulian/py3env/include -I/usr/include/python3.4m -c rocksdb/_rocksdb.cpp -o build/temp.linux-x86_64-3.4/rocksdb/_rocksdb.o -std=gnu++11 -O3 -Wall -Wextra -Wconversion -fno-strict-aliasing

cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++ [enabled by default]

rocksdb/_rocksdb.cpp:289:27: fatal error: rocksdb/slice.h: No such file or directory

 #include "rocksdb/slice.h"

                           ^

compilation terminated.

error: command 'x86_64-linux-gnu-gcc' failed with exit status 1

----------------------------------------
Command "/home/iulian/py3env/bin/python -c "import setuptools, tokenize;__file__='/tmp/pip-mndoekm3-build/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-3fwa2_ff-record/install-record.txt --single-version-externally-managed --compile --install-headers /home/iulian/py3env/include/site/python3.4" failed with error code 1 in /tmp/pip-mndoekm3-build

我尝试检查各种版本的 RocksDB(3.5、3.6、3.8、3.9),但仍然没有运气。

我在 64 位 Ubuntu 14.04 上使用 Python 3.4。

4

1 回答 1

1

您必须检查 Cython==0.20 是否已安装!我有同样的问题,并解决了它!

于 2015-06-06T08:47:43.377 回答