Search code examples
pythonberkeley-dbqgisbsddb

sudo easy_install bsddb3 error :Can't find a local Berkeley DB installation


I tried to make a plugin on qgis with Python 2.7.3

and there is a error happend images

and I find a way to install bsddb3 to replace bsddb

but when I try

$sudo easy_install bsddb3

it's give me a error

Can't find a local Berkeley DB installation

I have find a way that installed Homebrew and GCC can solve the problem

but after I install but error still happen

how I fix the problem?

here is i followed the steps on the

Hacking OS X’s Python dbhash and bsddb modules to work

2

enter image description here


Solution

  • Here's how I got bsddb3 to work on my Mac.

    First, download the Python module source (I used the .tar.gz version) from https://pypi.python.org/pypi/bsddb3/5.3.0

    Next, make sure BerkeleyDB is installed. I use MacPorts and installed the db48 package. This places the includefiles in /opt/local/include/db48 and the libraries in /opt/local/lib/db48. If you're using HomeBrew, those locations might be different.

    Unpack bsddb3 and install it using the correct paths:

    python setup.py --berkeley-db-incdir=/opt/local/include/db48 --berkeley-db-libdir=/opt/local/lib/db48 install
    

    After that, I had a working bsddb3 package. You still need to patch modules which try to include bsddb and replace it with bsddb3 instead.