无法在macOS Catalina 10.15.4上安装bsddb3 Python包。

4
我已经使用Homebrew安装了Berkeley-db,现在正在努力安装bsddb3 Python包。如果需要帮助,请告诉我。
bash-3.2$ BERKELEYDB_DIR=/usr/local/Cellar/berkeley-db/18.1.32_1 pip install bsddb3
Collecting bsddb3
  Using cached bsddb3-6.2.7.tar.gz (437 kB)
    ERROR: Command errored out with exit status 1:
     command: /Users/ryonlife/.local/share/virtualenvs/peg-scrapy-pegbot-ndRdHu61/bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/00/9r872f810sz481x6k9pqkldw0000gn/T/pip-install-03k5olgq/bsddb3/setup.py'"'"'; __file__='"'"'/private/var/folders/00/9r872f810sz481x6k9pqkldw0000gn/T/pip-install-03k5olgq/bsddb3/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /private/var/folders/00/9r872f810sz481x6k9pqkldw0000gn/T/pip-install-03k5olgq/bsddb3/pip-egg-info
         cwd: /private/var/folders/00/9r872f810sz481x6k9pqkldw0000gn/T/pip-install-03k5olgq/bsddb3/
    Complete output (8 lines):
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/private/var/folders/00/9r872f810sz481x6k9pqkldw0000gn/T/pip-install-03k5olgq/bsddb3/setup.py", line 42, in <module>
        import setup3
      File "/private/var/folders/00/9r872f810sz481x6k9pqkldw0000gn/T/pip-install-03k5olgq/bsddb3/setup3.py", line 354, in <module>
        db_ver = (int(fullverstr[0]), int(fullverstr[2]))
    ValueError: invalid literal for int() with base 10: '.'
    Trying to use the Berkeley DB you specified...
    ----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
2个回答

9
对我来说,关键是使用Homebrew安装berkeley-db@4,而不是berkeley-db。
brew install berkeley-db@4
BERKELEYDB_DIR=$(brew --prefix berkeley-db@4) pip install bsddb3

错误:您正在使用macOS 11.1。 我们不支持此预发布版本。 某些配方将导致构建失败。 请创建拉取请求,而不是在Homebrew的GitHub、Discourse、Twitter或IRC上寻求帮助。 您需要负责解决在运行此预发布版本时遇到的任何问题。 - Alexander.Li

0

请勿向Homebrew/brew或Homebrew/core报告此问题!

错误:您正在使用macOS 11.1。 我们不支持此预发布版本。 某些配方将导致构建失败。 请创建拉取请求,而不是在Homebrew的GitHub、Discourse、Twitter或IRC上寻求帮助。 您需要负责解决在运行此预发布版本时遇到的任何问题。


网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接