This repository was archived by the owner on Jun 27, 2025. It is now read-only.
Repository navigation
This repository was archived by the owner on Jun 27, 2025. It is now read-only.
pip3 install python-rocksdb fails #51
Copy link
Copy link
Open
Description
elementary OS 5.0
Python 3.6.7
platon@platon-N750JV:~$ sudo pip3 install python-rocksdb
[sudo] пароль для platon:
The directory '/home/platon/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
The directory '/home/platon/.cache/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
Collecting python-rocksdb
Downloading https://files.pythonhosted.org/packages/94/81/9a8e498a26ec34da9e1ae87e831468aedb4a6ba42aa9ea779b97896cfea7/python-rocksdb-0.7.0.tar.gz (219kB)
100% |████████████████████████████████| 225kB 2.4MB/s
Requirement already satisfied: setuptools>=25 in ./.local/lib/python3.6/site-packages (from python-rocksdb)
Installing collected packages: python-rocksdb
Running setup.py install for python-rocksdb ... error
Complete output from command /usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-x3_bbfl_/python-rocksdb/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-qg74bhu7-record/install-record.txt --single-version-externally-managed --compile:
running install
running build
running build_py
creating build
creating build/lib.linux-x86_64-3.6
creating build/lib.linux-x86_64-3.6/rocksdb
copying rocksdb/errors.py -> build/lib.linux-x86_64-3.6/rocksdb
copying rocksdb/interfaces.py -> build/lib.linux-x86_64-3.6/rocksdb
copying rocksdb/__init__.py -> build/lib.linux-x86_64-3.6/rocksdb
copying rocksdb/merge_operators.py -> build/lib.linux-x86_64-3.6/rocksdb
creating build/lib.linux-x86_64-3.6/rocksdb/tests
copying rocksdb/tests/test_memtable.py -> build/lib.linux-x86_64-3.6/rocksdb/tests
copying rocksdb/tests/__init__.py -> build/lib.linux-x86_64-3.6/rocksdb/tests
copying rocksdb/tests/test_options.py -> build/lib.linux-x86_64-3.6/rocksdb/tests
copying rocksdb/tests/test_db.py -> build/lib.linux-x86_64-3.6/rocksdb/tests
running egg_info
writing python_rocksdb.egg-info/PKG-INFO
writing dependency_links to python_rocksdb.egg-info/dependency_links.txt
writing requirements to python_rocksdb.egg-info/requires.txt
writing top-level names to python_rocksdb.egg-info/top_level.txt
reading manifest file 'python_rocksdb.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
writing manifest file 'python_rocksdb.egg-info/SOURCES.txt'
copying rocksdb/_rocksdb.cpp -> build/lib.linux-x86_64-3.6/rocksdb
copying rocksdb/_rocksdb.pyx -> build/lib.linux-x86_64-3.6/rocksdb
copying rocksdb/backup.pxd -> build/lib.linux-x86_64-3.6/rocksdb
copying rocksdb/cache.pxd -> build/lib.linux-x86_64-3.6/rocksdb
copying rocksdb/comparator.pxd -> build/lib.linux-x86_64-3.6/rocksdb
copying rocksdb/db.pxd -> build/lib.linux-x86_64-3.6/rocksdb
copying rocksdb/env.pxd -> build/lib.linux-x86_64-3.6/rocksdb
copying rocksdb/filter_policy.pxd -> build/lib.linux-x86_64-3.6/rocksdb
copying rocksdb/iterator.pxd -> build/lib.linux-x86_64-3.6/rocksdb
copying rocksdb/logger.pxd -> build/lib.linux-x86_64-3.6/rocksdb
copying rocksdb/memtablerep.pxd -> build/lib.linux-x86_64-3.6/rocksdb
copying rocksdb/merge_operator.pxd -> build/lib.linux-x86_64-3.6/rocksdb
copying rocksdb/options.pxd -> build/lib.linux-x86_64-3.6/rocksdb
copying rocksdb/slice_.pxd -> build/lib.linux-x86_64-3.6/rocksdb
copying rocksdb/slice_transform.pxd -> build/lib.linux-x86_64-3.6/rocksdb
copying rocksdb/snapshot.pxd -> build/lib.linux-x86_64-3.6/rocksdb
copying rocksdb/status.pxd -> build/lib.linux-x86_64-3.6/rocksdb
copying rocksdb/std_memory.pxd -> build/lib.linux-x86_64-3.6/rocksdb
copying rocksdb/table_factory.pxd -> build/lib.linux-x86_64-3.6/rocksdb
copying rocksdb/universal_compaction.pxd -> build/lib.linux-x86_64-3.6/rocksdb
creating build/lib.linux-x86_64-3.6/rocksdb/cpp
copying rocksdb/cpp/comparator_wrapper.hpp -> build/lib.linux-x86_64-3.6/rocksdb/cpp
copying rocksdb/cpp/filter_policy_wrapper.hpp -> build/lib.linux-x86_64-3.6/rocksdb/cpp
copying rocksdb/cpp/memtable_factories.hpp -> build/lib.linux-x86_64-3.6/rocksdb/cpp
copying rocksdb/cpp/merge_operator_wrapper.hpp -> build/lib.linux-x86_64-3.6/rocksdb/cpp
copying rocksdb/cpp/slice_transform_wrapper.hpp -> build/lib.linux-x86_64-3.6/rocksdb/cpp
copying rocksdb/cpp/utils.hpp -> build/lib.linux-x86_64-3.6/rocksdb/cpp
copying rocksdb/cpp/write_batch_iter_helper.hpp -> build/lib.linux-x86_64-3.6/rocksdb/cpp
running build_ext
cythoning rocksdb/_rocksdb.pyx to rocksdb/_rocksdb.cpp
/tmp/pip-build-x3_bbfl_/python-rocksdb/.eggs/Cython-0.29.7-py3.6-linux-x86_64.egg/Cython/Compiler/Main.py:367: FutureWarning: Cython directive 'language_level' not set, using 2 for now (Py2). This will change in a later release! File: /tmp/pip-build-x3_bbfl_/python-rocksdb/rocksdb/_rocksdb.pyx
tree = Parsing.p_module(s, pxd, full_module_name)
building 'rocksdb._rocksdb' extension
creating build/temp.linux-x86_64-3.6
creating build/temp.linux-x86_64-3.6/rocksdb
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 -I/usr/include/python3.6m -c rocksdb/_rocksdb.cpp -o build/temp.linux-x86_64-3.6/rocksdb/_rocksdb.o -std=c++11 -O3 -Wall -Wextra -Wconversion -fno-strict-aliasing -fno-rtti
rocksdb/_rocksdb.cpp:617:10: fatal error: rocksdb/slice.h: Нет такого файла или каталога
#include "rocksdb/slice.h"
^~~~~~~~~~~~~~~~~
compilation terminated.
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
----------------------------------------
Command "/usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-x3_bbfl_/python-rocksdb/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-qg74bhu7-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-x3_bbfl_/python-rocksdb/
Metadata
Metadata
Assignees
Labels
No labels
Activity
twmht commentedon May 15, 2019
@PlatonB
the version of rocksdb you used?
marcosschroh commentedon May 17, 2019
Hi,
I can not installed as well.
python version: 3.7Any ideas?
iFA88 commentedon May 17, 2019
This is similar for me when i have git cloned the latest rocksdb branch. I suggest to try this: https://github.com/facebook/rocksdb/archive/v5.18.3.tar.gz
extract, then:
marcosschroh commentedon May 18, 2019
Hi @iFA88
Thanks for the answer. So, according to what you are saying I have to install
rocksdbfirst and thenpython-rocksdb? I haverocksdbrunning in a container and I have separate container with python code that has to talk with thedatabase. How would you approach this scenario?iFA88 commentedon May 18, 2019
You need first install
rocksdblibrary, set environment withexportthat the pip compiler knows where are the headers and then you can installpython-rocksdbwithpip.If you use
virtualenvyou need usesourcebefore you launch thepipinstaller.TomGoBravo commentedon Nov 5, 2019
@marcosschroh python-rocksdb links the rocksdb cpp code; they need to be installed in the same container.
@PlatonB : Did you manage to install the rocksdb library and headers?
@twmht Without more details from the original poster I think it makes sense to close this issue.
marcosschroh commentedon Nov 5, 2019
@TomGoBravo yes, I have managed to install
rocksdb. Works perfectly withfaustjkgenser commentedon Feb 6, 2021
@iFA88 : Do you happen to have an example dockerfile of building your fork of rocksdb successfully? I've been trying to build using facebook but I keep getting an error with linking at the very end of the build.
iFA88 commentedon Feb 8, 2021
I did not have any, but paste your docker builder file content here, let me see.
hyerim-kim commentedon Mar 5, 2021
@jkgenser I have been resolved this issue without build rocsdb using under command.
And also I have been succeeded build rocksdb using dockerfile and installed python-rocksdb after resolving the above errors, but I'm not sure it helps you. Here is a part of my dockerfile to build and install rocksdb. I wish it can help you.
Gabriel-Gardin commentedon May 26, 2021
I get the same error when I install it in my default python(not virtualenv) but I can install it with no problems inside venv
Gabriel-Gardin commentedon May 26, 2021
Turns out I didn't had Cython installed in my local python, after install it I managed to also install python-rocksdb
Congyuwang commentedon Jan 1, 2022
Try this: https://github.com/Congyuwang/RocksDict.
pip install rocksdictNo need to compile. Pre-built wheels for python 3.6-3.10, Windows, Mac, and Linux