Attempting to use Project Gutenberg in Python 3

1k views Asked by At

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.

0

There are 0 answers