Sono totalmente nuovo per Python e ho questo messaggio quando si tenta di importare bsdddbInstallazione bsddb pacchetto - python
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/bsddb/__init__.py", line 67, in <module>
import _bsddb
ImportError: No module named _bsddb
così ho seguito this e this, così ho scaricato questo pacchetto bsddb3-4.5.0.tar.gz
. Cosa dovrei fare con esso, ho provato a eseguire python install setup.py int il bsddb3-4.5.0 nella directory giusta (sto usando un osx). Poi ottengo
Can't find a local BerkeleyDB installation.
(suggestion: try the --berkeley-db=/path/to/bsddb option)
Qualcuno potrebbe aiutare?
installazione pip diritto non ha funzionato per me, ho dovuto andare alla directory di origine di bsddb3 e fare un installazione python.py installazione --berkeley-db = $ (brew --prefix)/berkeley-db /5.3.21/ –
Sembra che potrebbe essere spostato di nuovo in Brew, espandendo il commento di Chmouel: 'python setup.py installa --berkeley-db = \' trova $ (brew --prefix)/*/berkeley-db/5 * -name berk * \ '' – Sean
Questo ha funzionato per me su Mavericks usando 'python' da Apple e' pip' e 'berkeley-db' da Homebrew (come root):' BERKELEYDB_DIR = $ (brew --cellar) /berkeley-db/5.3.28 pip installa bsddb'' (per i dettagli vedi http://chriszf.posthaven.com/getting-berkeleydb-working-with-python-on-osx) –