c-w / gutenberg

A simple interface to the Project Gutenberg corpus.
Apache License 2.0
320 stars 60 forks source link

Not able to install latest version #135

Closed venkat-vangal closed 4 years ago

venkat-vangal commented 4 years ago

Getting the below error

Installing 'Gutenberg==0.8.1' -----Collecting Gutenberg==0.8.1 Using cached https://files.pythonhosted.org/packages/33/99/bdc0c0ebacdb957834154b0ce1fae4eb3368198d5fbf61106b0eefb0c9a2/Gutenberg-0.8.1.tar.gz Collecting SPARQLWrapper>=1.8.2 (from Gutenberg==0.8.1) Using cached https://files.pythonhosted.org/packages/00/9b/443fbe06996c080ee9c1f01b04e2f683b2b07e149905f33a2397ee3b80a2/SPARQLWrapper-1.8.5-py3-none-any.whl Collecting bsddb3>=6.1.0 (from Gutenberg==0.8.1) Using cached https://files.pythonhosted.org/packages/fa/ad/eb82bcccbfb076b6a6797f48c339460699103065fb2a2fc72403b16970fe/bsddb3-6.2.7.tar.gz ERROR: Command errored out with exit status 1: command: 'C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python3764\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\....\AppData\Local\Temp\pip-install-hw00bds\bsddb3\setup.py'"'"'; file='"'"'C:\Users\.....\AppData\Local\Temp\pip-install-hw00bds_\bsddb3\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' egginfo --egg-base pip-egg-info cwd: C:\Users...\AppData\Local\Temp\pip-install-hw00bds\bsddb3\ Complete output (7 lines): Traceback (most recent call last): File "", line 1, in File "C:\Users....\AppData\Local\Temp\pip-install-hw00bds\bsddb3\setup.py", line 42, in import setup3 File "C:\Users....\AppData\Local\Temp\pip-install-hw00bds\bsddb3\setup3.py", line 385, in with open(os.path.join(incdir, 'db.h'), 'r') as f : FileNotFoundError: [Errno 2] No such file or directory: 'db/include\db.h'

MasterOdin commented 4 years ago

It looks like your platform is Windows, and have you tried installing a pre-compiled version of bsddb3 from the site listedin https://github.com/c-w/gutenberg#windows?

The failure here is related to bsdd3 trying to set itself up and linking against an installed version of bsddb, which is a pain to try and get working on Windows, which is why we recommend the pre-compiled binaries in that above link in the README.

venkat-vangal commented 4 years ago

image We are using Python 3.8 and when I tried to install from downloaded version, it is giving me the above error

venkat-vangal commented 4 years ago

Tried with Python 3.7 64 bit also but same error

MasterOdin commented 4 years ago

If you're on Python 3.8, you'll want to be installing bsddb3‑6.2.7‑cp38‑cp38‑win_amd64.whl. If you're on Python 3.7, you'll want to install bsddb3‑6.2.7‑cp37‑cp37m‑win_amd64.whl. The cp## should correspond to your python version #.#.

In your screenshot, it looks like you're attempting to install the Python 2.7 (cp27) and 3.9 (cp39) wheels to Python 3.8, which won't work.

venkat-vangal commented 4 years ago

image

3.7 on 3.7 also not working

venkat-vangal commented 4 years ago

pip install C:\Users...\Downloads\bsddb3-6.2.7-cp38-cp38-win32.whl

worked on my system. as this python version is 3.8 and 32 bit and processor is intel