5

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

blueman010112
  • 456
  • 1
  • 7
  • 19
  • Asked and answered here: http://stackoverflow.com/questions/814041/how-to-fix-the-broken-bsddb-install-in-the-default-python-package-on-mac-os-x-10 – robertklep Mar 04 '13 at 06:14
  • yeah,I have tried that homepage's solution but I try to install bsddb3 the error happend....I even can't install bsddb3 at first it's need Berkeley DB,but I don't know how to install it – blueman010112 Mar 04 '13 at 06:27
  • Perhaps it works better if you download bsddb3 (instead of using easy_install), usually you can edit `setup.py` to configure paths for local library/header locations). Download can be found [here](https://pypi.python.org/pypi/bsddb3/5.3.0). – robertklep Mar 04 '13 at 06:33
  • http://imgur.com/cCREVPI it's just need berkely DB again.... – blueman010112 Mar 04 '13 at 06:46
  • Did you use the `--berkeley-db` option as suggested in the error message? – robertklep Mar 04 '13 at 07:04
  • -bash: --berkeley-db=/usr/local/Cellar/berkeley-db/5.3.21: No such file or directory it's give me this error I am so sure I have that directory – blueman010112 Mar 04 '13 at 07:14

1 Answers1

10

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.

robertklep
  • 198,204
  • 35
  • 394
  • 381