wbolster / plyvel

Plyvel, a fast and feature-rich Python interface to LevelDB
https://plyvel.readthedocs.io/
Other
530 stars 75 forks source link

Can't Install on OSX #34

Closed ConceptPending closed 10 years ago

ConceptPending commented 10 years ago

I've only used Plyvel on Linux before, and I'm having the following issues when trying to install on OSX.

plyvel/_plyvel.cpp:321:10: fatal error: 'leveldb/db.h' file not found

#include "leveldb/db.h"

I've installed LevelDB from source, and installing "pip install leveldb" gets me a working py-leveldb install, but I'd much rather use plyvel if I can get it working.

I've tried Googling every aspect of the issue possible, but at this point I've been on a wild goose chase for over a day now and am no closer to being able to use plyvel on OSX.

Thanks,

Nick

wbolster commented 10 years ago

It seems like the compiler can't find the LevelDB headers. Are you sure they are available from a location used by the compiler? Maybe you need to set CFLAGS or something like that if it's in a non-standard location? On my recent Debian and Ubuntu systems it picks up the system LevelDB from /usr/include/ just fine.

Wrt. py-leveldb: I think it fetches a private LevelDB copy instead of using the system lib.

ConceptPending commented 10 years ago

For whatever reason, I was able to get it working when I installed Leveldb using Homebrew, but I couldn't get it working when compiling from source.

Thanks for the info.

wbolster commented 10 years ago

Similar reports in #30 and #33. Maybe those help?

bakavic commented 9 years ago

Just wanted to drop a note - in OS X, it seems like /usr/local/include, where the leveldb headers (db.h) live, is not visible to gcc.

You need to install the Apple command line tools:

xcode-select --install

plyvel will compile after that.

wbolster commented 9 years ago

... or use homebrew.

Victor Heng notifications@github.com schreef op 31 januari 2015 09:22:14 CET:

Just wanted to drop a note - in OS X, it seems like /usr/local/include, where the leveldb headers (db.h) live, is not visible to gcc.

You need to install the Apple command line tools:

xcode-select --install

plyvel will compile after that.


Reply to this email directly or view it on GitHub: https://github.com/wbolster/plyvel/issues/34#issuecomment-72309360

Sent from my Android device with K-9 Mail. Please excuse my brevity.

bakavic commented 9 years ago

Hmm, I did use homebrew to install leveldb, but gcc still could not pick it up.

Is there any special thing I need to do apart from brew install leveldb?

wbolster commented 9 years ago

Not sure. I installed both the xcode stuff and homebrew...

mahmoudimus commented 9 years ago

@bakavic how I ended it up fixing it: pip install --global-option=build_ext --global-option="-I/usr/local/include" --global-option="-L/usr/local/lib" Plyvel

wbolster commented 6 years ago

see also #66 which seems similar btw

PaulRBerg commented 6 years ago

I tried all the suggestions in this issue and everything I found on the web, but I still get:

plyvel/_plyvel.cpp:589:10: fatal error: 'leveldb/db.h' file not found
#include "leveldb/db.h"

Opened an issue in the plasma-mvp repo, but I think the bug is caused by plyvel.

https://github.com/omisego/plasma-mvp/issues/166

wbolster commented 6 years ago

@paulrberg that issue you linked to indicates that you got it working. it would be nice if you mentioned that here as well, including the solution to your problem.

PaulRBerg commented 6 years ago

Hey @wbolster, I got it half-working, because I had to completely reinstall the environment. I was waiting for a reply from someone in that repo, to make sure it was just related to my python set up.

The "solution" was to erase all python executables in the os, install pyenv, pyenv-virtualenv and the versions I needed. leveldb had always been installed.

wbolster commented 6 years ago

@PaulRBerg ok, thanks! it was not a plyvel problem after all, then. :+1: