gpt4 book ai didi

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

转载 作者:行者123 更新时间:2023-12-02 16:37:10 27 4
gpt4 key购买 nike

我已经使用 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.

最佳答案

我的诀窍是使用 Homebrew 安装 berkeley-db@4,而不是 berkeley-db。

brew install berkeley-db@4
BERKELEYDB_DIR=$(brew --prefix berkeley-db@4) pip install bsddb3

关于python - 无法在 macOS Catalina 10.15.4 上安装 bsddb3 Python 包,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/62457435/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com