Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to Fix the Broken BSDDB Install in the Default Python Package on Mac OS X 10.5 Leopard?

Do the following on the default Python install on Mac OS X 10.5 (Leopard) w/ Developer Tools:

noel ~ : python

Python 2.5.1 (r251:54863, Jan 13 2009, 10:26:13) 
[GCC 4.0.1 (Apple Inc. build 5465)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import bsddb
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/bsddb/__init__.py", line 51, in <module>
import _bsddb
ImportError: No module named _bsddb

nice, huh? How do I fix this without giving up and installing/configuring/maintaining my own Python package as per TMNC's suggestion or using MacPorts etc?

Edit

I've gone around the problem by installing Python2.4 and BSDDB via MacPorts.

My question still stands: why is the default install broken and is it possible to fix it.

like image 859
Noel Avatar asked Jan 23 '23 15:01

Noel


1 Answers

Follow the instructions at http://marc-abramowitz.com/archives/2007/11/28/hacking-os-xs-python-dbhash-and-bsddb-modules-to-work/ .

like image 199
Alex Martelli Avatar answered Jan 26 '23 05:01

Alex Martelli