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

时间:2019-10-30 18:00:44

标签: 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

1 个答案:

答案 0 :(得分:0)

在Ubuntu系统上(因为OP正在使用Ubuntu),您需要安装libdb++-dev软件包,然后安装bsddb3 python软件包就可以了:

sudo apt-get install libdb++-dev
export BERKELEYDB_DIR=/usr
pip3 install bsddb3
相关问题