Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to fix "Can't find local Berkeley DB" error?

I'm trying to install scrapy-deltafetch in a virtual-environment (as described here) on my new raspberry pi 3 with Raspbian.

When I'm running pip install scrapy-deltafetch in my virtualenv, I'm getting something like this:

python setup.py egg_info: Can't find a local Berkeley DB installation

Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-ib6d93/bsddb3/

However when I'm running sudo pip install scrapy-deltafetch outside of my virtual-environment everything works fine.

Does anybody has an idea of how to install scrapy-deltafetch in the virtualenvironment?

like image 547
Michael Haar Avatar asked Aug 01 '16 17:08

Michael Haar


2 Answers

Your system is missing Berkeley DB, which is used by DeltaFetch to store requests data.

So, first install Berkeley DB in your system (found this tutorial in a quick search).

After that, you have to install the bsddb3 Python package (you can follow the instructions from this answer).

Edit (2020):

This should work:

$ sudo apt install libdb-dev
$ pip install bsddb3
like image 151
Valdir Stumm Junior Avatar answered Sep 24 '22 12:09

Valdir Stumm Junior


In case of my Ubuntu 18.04 missing system library is called libdb-dev.

> sudo apt-get install libdb-dev

This fixed the problem for me.

like image 21
Pawel Miech Avatar answered Sep 24 '22 12:09

Pawel Miech