[pybsddb] Installing on modern berkeley-db fails with xx.y version-number check

Diederik van der Boor | Edoburu vdboor at edoburu.nl
Fri Jan 3 21:34:55 CET 2020


Hi everyone,

I’m trying to install bsddb3 on a modern OSX system.
This fails at the version number check, which naively assumes it’s a single digit x.y version:


❯ brew install berkeley-db
❯ export YES_I_HAVE_THE_RIGHT_TO_USE_THIS_BERKELEY_DB_VERSION=1
❯ pip install bsddb3
Collecting bsddb3
  Using cached https://files.pythonhosted.org/packages/e9/fc/ebfbd4de236b493f9ece156f816c21df0ae87ccc22604c5f9b664efef1b9/bsddb3-6.2.6.tar.gz
    Complete output from command python setup.py egg_info:
    Trying to use the Berkeley DB you specified...
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/private/var/folders/jj/p47391fj7b75pw61zvpph4w40000gn/T/pip-install-upg69tsr/bsddb3/setup.py", line 42, in <module>
        import setup3
      File "/private/var/folders/jj/p47391fj7b75pw61zvpph4w40000gn/T/pip-install-upg69tsr/bsddb3/setup3.py", line 354, in <module>
        db_ver = (int(fullverstr[0]), int(fullverstr[2]))
    ValueError: invalid literal for int() with base 10: '.'
    
    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /private/var/folders/jj/p47391fj7b75pw61zvpph4w40000gn/T/pip-install-upg69tsr/bsddb3/


However, the version string is 18.1:

 ❯ grep DB_VERSION_STRING /usr/local/include/db.h
#define	DB_VERSION_STRING	"Berkeley DB 18.1.32: (February 19, 2019)"


The workaround has been so far:

❯ brew uninstall berkeley-db
❯ brew install berkeley-db at 4
❯ export BERKELEYDB_DIR=/usr/local/Cellar/berkeley-db at 4/4.8.30/
❯ pip install bsddb3


Could you fix the fullverstr parsing, e.g. by using tuple(map(int, fullverstr.split(‘.’)))


Best,
Diederik
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.jcea.es/pipermail/pybsddb/attachments/20200103/cb50992a/attachment.htm>


More information about the pybsddb mailing list