question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Install Error on Windows 10

See original GitHub issue

Following the instructions given for installation on Windows 10, it goes smoothly until the last step (pip3 install cltk), at which point at series of warnings and errors occur, and the installation procedure is aborted.

Here is the transcript from my attempt:

(venv)scott@TRAJAN:/mnt/c/Users/Scott$ pip3 install cltk
Downloading/unpacking cltk
  Downloading cltk-0.1.46.tar.gz (419kB): 419kB downloaded
  Running setup.py (path:/home/scott/venv/build/cltk/setup.py) egg_info for package cltk

Downloading/unpacking fuzzywuzzy (from cltk)
  Downloading fuzzywuzzy-0.14.0-py2.py3-none-any.whl
Downloading/unpacking gitpython (from cltk)
  Downloading GitPython-2.1.1-py2.py3-none-any.whl (441kB): 441kB downloaded
Downloading/unpacking nltk (from cltk)
  Downloading nltk-3.2.1.tar.gz (1.1MB): 1.1MB downloaded
  Running setup.py (path:/home/scott/venv/build/nltk/setup.py) egg_info for package nltk

    warning: no files found matching 'README.txt'
    warning: no files found matching 'Makefile' under directory '*.txt'
    warning: no previously-included files matching '*~' found anywhere in distribution
Downloading/unpacking python-Levenshtein (from cltk)
  Downloading python-Levenshtein-0.12.0.tar.gz (48kB): 48kB downloaded
  Running setup.py (path:/home/scott/venv/build/python-Levenshtein/setup.py) egg_info for package python-Levenshtein

    warning: no previously-included files matching '*pyc' found anywhere in distribution
    warning: no previously-included files matching '*so' found anywhere in distribution
    warning: no previously-included files matching '.project' found anywhere in distribution
    warning: no previously-included files matching '.pydevproject' found anywhere in distribution
Downloading/unpacking pyuca (from cltk)
  Downloading pyuca-1.1.2-py2.py3-none-any.whl (547kB): 547kB downloaded
Downloading/unpacking pyyaml (from cltk)
  Downloading PyYAML-3.12.tar.gz (253kB): 253kB downloaded
  Running setup.py (path:/home/scott/venv/build/pyyaml/setup.py) egg_info for package pyyaml

Downloading/unpacking regex (from cltk)
  Downloading regex-2016.11.21.tar.gz (599kB): 599kB downloaded
  Running setup.py (path:/home/scott/venv/build/regex/setup.py) egg_info for package regex

Downloading/unpacking whoosh (from cltk)
  Downloading Whoosh-2.7.4-py2.py3-none-any.whl (468kB): 468kB downloaded
Downloading/unpacking gitdb2>=2.0.0 (from gitpython->cltk)
  Downloading gitdb2-2.0.0-py2.py3-none-any.whl (63kB): 63kB downloaded
Requirement already satisfied (use --upgrade to upgrade): setuptools in /home/scott/venv/lib/python3.4/site-packages (from python-Levenshtein->cltk)
Downloading/unpacking smmap2>=2.0.0 (from gitdb2>=2.0.0->gitpython->cltk)
  Downloading smmap2-2.0.1-py2.py3-none-any.whl
Installing collected packages: cltk, fuzzywuzzy, gitpython, nltk, python-Levenshtein, pyuca, pyyaml, regex, whoosh, gitdb2, smmap2
  Running setup.py install for cltk

  Running setup.py install for nltk

    warning: no files found matching 'README.txt'
    warning: no files found matching 'Makefile' under directory '*.txt'
    warning: no previously-included files matching '*~' found anywhere in distribution
  Running setup.py install for python-Levenshtein

    warning: no previously-included files matching '*pyc' found anywhere in distribution
    warning: no previously-included files matching '*so' found anywhere in distribution
    warning: no previously-included files matching '.project' found anywhere in distribution
    warning: no previously-included files matching '.pydevproject' found anywhere in distribution
    building 'Levenshtein._levenshtein' extension
    x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -g -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/python3.4m -I/home/scott/venv/include/python3.4m -c Levenshtein/_levenshtein.c -o build/temp.linux-x86_64-3.4/Levenshtein/_levenshtein.o
    Levenshtein/_levenshtein.c:99:20: fatal error: Python.h: No such file or directory
     #include <Python.h>
                        ^
    compilation terminated.
    error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
    Complete output from command /home/scott/venv/bin/python3 -c "import setuptools, tokenize;__file__='/home/scott/venv/build/python-Levenshtein/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-n213xl9s-record/install-record.txt --single-version-externally-managed --compile --install-headers /home/scott/venv/include/site/python3.4:
    running install

running build

running build_py

creating build

creating build/lib.linux-x86_64-3.4

creating build/lib.linux-x86_64-3.4/Levenshtein

copying Levenshtein/StringMatcher.py -> build/lib.linux-x86_64-3.4/Levenshtein

copying Levenshtein/__init__.py -> build/lib.linux-x86_64-3.4/Levenshtein

running egg_info

writing entry points to python_Levenshtein.egg-info/entry_points.txt

writing top-level names to python_Levenshtein.egg-info/top_level.txt

writing dependency_links to python_Levenshtein.egg-info/dependency_links.txt

writing namespace_packages to python_Levenshtein.egg-info/namespace_packages.txt

writing requirements to python_Levenshtein.egg-info/requires.txt

writing python_Levenshtein.egg-info/PKG-INFO

warning: manifest_maker: standard file '-c' not found



reading manifest file 'python_Levenshtein.egg-info/SOURCES.txt'

reading manifest template 'MANIFEST.in'

warning: no previously-included files matching '*pyc' found anywhere in distribution

warning: no previously-included files matching '*so' found anywhere in distribution

warning: no previously-included files matching '.project' found anywhere in distribution

warning: no previously-included files matching '.pydevproject' found anywhere in distribution

writing manifest file 'python_Levenshtein.egg-info/SOURCES.txt'

copying Levenshtein/_levenshtein.c -> build/lib.linux-x86_64-3.4/Levenshtein

copying Levenshtein/_levenshtein.h -> build/lib.linux-x86_64-3.4/Levenshtein

running build_ext

building 'Levenshtein._levenshtein' extension

creating build/temp.linux-x86_64-3.4

creating build/temp.linux-x86_64-3.4/Levenshtein

x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -g -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/python3.4m -I/home/scott/venv/include/python3.4m -c Levenshtein/_levenshtein.c -o build/temp.linux-x86_64-3.4/Levenshtein/_levenshtein.o

Levenshtein/_levenshtein.c:99:20: fatal error: Python.h: No such file or directory

 #include <Python.h>

                    ^

compilation terminated.

error: command 'x86_64-linux-gnu-gcc' failed with exit status 1

----------------------------------------
Cleaning up...
Command /home/scott/venv/bin/python3 -c "import setuptools, tokenize;__file__='/home/scott/venv/build/python-Levenshtein/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-n213xl9s-record/install-record.txt --single-version-externally-managed --compile --install-headers /home/scott/venv/include/site/python3.4 failed with error code 1 in /home/scott/venv/build/python-Levenshtein
Storing debug log for failure in /home/scott/.pip/pip.log

Interestingly, it appears the installation steps result in Python 3.4 being installed, not the version 3.5 that the compatibility warning on the Installation page would seem to require. But as the offending error is a missing Python header file (Python.h), perhaps that is immaterial.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
RadixSevencommented, Mar 19, 2017

You might try installing python3-dev as well as python-dev - that cured the missing header problem for me on a different package.

0reactions
kylepjohnsoncommented, Jan 23, 2017

OK. I’ll close for now, then. Maybe another can help.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Get help with Windows upgrade and installation errors
Make sure that your device has enough space. · Run Windows Update a few times. · Check third-party drivers and download any updates....
Read more >
[SOLVED] Windows 10 Installation Has Failed - Driver Easy
[SOLVED] Windows 10 Installation Has Failed · Try these fixes… · Fix 1: Remove the peripheral devices · Fix 2: Clear an attribute...
Read more >
Windows 10 Installation Has Failed [Easily FIXED]
How do I fix Windows 10 installation failed? · 1. Unplug all peripheral devices · 2. Uninstall the language pack · 3. Uninstall...
Read more >
How to Fix "Windows 10 Installation has Failed" Error? - Appuals
This error can occur if you're using certain Windows 10 installers. These installers may try to overwrite some common installation files that ...
Read more >
[SOLVED] Windows 10 Could Not Complete the Installation + ...
Case 2: Windows 10 Installation Has Failed · Fix 1. Check Whether Your Computer Meets the Minimum Requirements · Fix 2. Clear Certain...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found