2

I was using the Project Gutenberg API (I'm new, forgive me if this isn't actually the right term) with Python 2 just fine. But I needed to start using Python 3 for other reasons.

I'm having a lot of difficulties getting Gutenberg to work with Python 3. I understand (according to this site: https://pypi.org/project/Gutenberg/) that I need to manually install BSD-DB, and I think that's the problem I'm running into.

brew install berkeley-db4

works just fine, but

pip install -r requirements-py3.pip

returns the error:

Could not open requirements file: [Errno 2] No such file or directory: 'requirements-py3.pip'

After research online, I also tried

BERKELEYDB_DIR=$(brew --prefix berkeley-db) YES_I_HAVE_THE_RIGHT_TO_USE_THIS_BERKELEY_DB_VERSION=yes pip install bsddb3

which returns the error:

Command "python setup.py egg_info" failed with error code 1 in /private/var/folders/gb/z8bwwygn0y5gcknl24_7bfz40000gn/T/pip-build-_VUMDe/bsddb3/

I'm sorta overwhelmed by all the things that could be going on and starting to feel my lack of coding knowledge. Any nudge in the right direction would be greatly appreciated.

Samuel Liew
  • 76,741
  • 107
  • 159
  • 260
Will
  • 351
  • 4
  • 15
  • Did you clone the git repository of https://github.com/c-w/Gutenberg? Also can you provide the full output of the commands you run? I think you are mixing python2 and python3. Make sure to use the correct version of `pip` via the `pip3` command. – amirouche Nov 03 '18 at 19:50

0 Answers0