1

So, I've been trying to install the gutenberg module for python pip install gutenberg using the directions at this site (using brew instead of pip since I'm on a mac). Every time I try do do it, it returns with this:

pip install gutenberg
Collecting gutenberg
  Using cached Gutenberg-0.4.2.tar.gz
Collecting bsddb3>=6.1.0 (from gutenberg)
  Using cached bsddb3-6.2.1.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)

    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /private/var/folders/53/zsh0zhwx635d_rss6hkgrknr0000gn/T/pip-build-Mn4wGp/bsddb3/

So, I installed the berkeley database using brew (brew install berkeley-db) and the error changed:

pip install gutenberg
Requirement already satisfied (use --upgrade to upgrade): gutenberg in ./anaconda2/lib/python2.7/site-packages/Gutenberg-0.4.2-py2.7.egg
Collecting bsddb3>=6.1.0 (from gutenberg)
  Using cached bsddb3-6.2.1.tar.gz
    Complete output from command python setup.py egg_info:
    Trying to use the Berkeley DB you specified...
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/private/var/folders/53/zsh0zhwx635d_rss6hkgrknr0000gn/T/pip-build-FEd8dy/bsddb3/setup.py", line 40, in <module>
        import setup2
      File "setup2.py", line 350, in <module>
        "version %d.%d" %db_ver)
    TypeError: %d format: a number is required, not NoneType

    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /private/var/folders/53/zsh0zhwx635d_rss6hkgrknr0000gn/T/pip-build-FEd8dy/bsddb3/

I tried doing easy_install, re-installing setup-tools, and a bunch of other stuff. Here's the links to all the things I've tried:

Can't install via pip because of egg_info error

Python pip install gives "Command "python setup.py egg_info" failed with error code 1"

Python pip install fails: invalid command egg_info

pip fails to install anything, error: invalid command 'egg_info'

https://github.com/PokemonGoF/PokemonGo-Bot/issues/2919

When I say I've tried all of them, I really do mean all of the suggestions in the links above, so maybe I messed something up in that process. I'm not entirely sure what's going on, I've been working on it for hours and haven't been able to discover with any successful solutions. I'm not sure if I'm missing something here but if anyone has any suggestions it would really help.

Community
  • 1
  • 1
pythontyler
  • 131
  • 3
  • 5
  • You need to install Berkeley DB from here:http://www.oracle.com/technetwork/database/database-technologies/berkeleydb/downloads/index.html – Ganesh Kathiresan Oct 15 '16 at 07:31

1 Answers1

0

Just an addition from my side... I fixed this issue on my Windows 10 for python 3.4:

Go to Powershell Window and type below:

1) Update pip >>>>>     py -3.4 -m pip install --upgrade pip
2) Install Numpy >>>>>  py -3.4 -m pip install numpy
3) Install Matplotlib >>>> py -3.4 -m pip install matplotlib
HelloWorld024
  • 133
  • 1
  • 1
  • 11