python - 我正在尝试安装 bsddb3,但出现错误,我该如何解决?

标签 python pip installation berkeley-db

我在控制台写:

pip3 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:
    Can't find a local Berkeley DB installation.
    (suggestion: try the --berkeley-db=/path/to/bsddb option)

后写:python -m pip install bsddb --berkeley-db=/path/to/bsddb
Usage:   
  /usr/bin/python -m pip install [options] <requirement specifier> [package-index-options] ...
  /usr/bin/python -m pip install [options] -r <requirements file> [package-index-options] ...
  /usr/bin/python -m pip install [options] [-e] <vcs project url> ...
  /usr/bin/python -m pip install [options] [-e] <local project path> ...
  /usr/bin/python -m pip install [options] <archive url/path> ...
  no such option: --berkeley-db

最佳答案

在 Ubuntu 系统上(因为 OP 使用的是 Ubuntu),您需要安装 libdb++-dev打包然后bsddb3 python包安装正常:

sudo apt-get install libdb++-dev
export BERKELEYDB_DIR=/usr
pip3 install bsddb3

关于python - 我正在尝试安装 bsddb3,但出现错误,我该如何解决?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58631288/

相关文章:

python - 如何使用运算符 'and' 和/或 'or' 映射两个过滤列表

Python3 : matplotlib. pyplot.plot_date() 日期标签溢出

python - pip 是否可以在不检查 SSL 证书的情况下访问 pypi,或者它甚至可以使用 http 而不是 https?

python - 在 mac (Big Sur) 上导入模块的问题,以及 sys.executable 和包的位置不匹配?

python - Windows 上的 Pip SSL 错误

package - 在 sublime text 3 中安装多个包

python - 无法使用python子进程从curl调用获取返回值

python - 将 tensorflow 1.x.x 模型加载到 tensorflow 2.x.x

macos - 如何在终端 mac OS X 中使用和安装 SystemC?

java - 通过 java 使用 Mac 安装程序命令