Rasa: httptools build fail while pip installing requirements.txt

Created on 25 Apr 2019  路  14Comments  路  Source: RasaHQ/rasa

Rasa version: 0.13.1

Python version: 3.6.8

Operating system (windows, osx, ...): osx

Issue: httptools does not build while installing requirements for rasa_nlu
$ pip install -r requirements.txt

Building wheel for httptools (setup.py) ... error ERROR: Complete output from command /Users/mohit/anaconda3/envs/condapy36/bin/python -u -c 'import setuptools, tokenize;file='"'"'/private/var/folders/9t/0qgpwgy906z_sww71dnkgkr80000gn/T/pip-install-7hmlhuo6/httptools/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'rn'"'"', '"'"'n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' bdist_wheel -d /private/var/folders/9t/0qgpwgy906z_sww71dnkgkr80000gn/T/pip-wheel-u02mzs5m --python-tag cp36: ERROR: running bdist_wheel

error: command 'gcc' failed with exit status 1
---------------------------------------- ERROR: Failed building wheel for httptools Running setup.py clean for httptools Building wheel for ujson (setup.py) ... error

$ pip install -e .

Obtaining file:///Users/mohit/work/research/NLP/Rasa/rasa_nlu ERROR: Error installing 'file:///Users/mohit/work/research/NLP/Rasa/rasa_nlu': editable mode is not supported for pyproject.toml-style projects. pip is processing this project as pyproject.toml-style because it has a pyproject.toml file. Since the project has a setup.py and the pyproject.toml has no "build-backend" key for the "build_system" value, you may pass --no-use-pep517 to opt out of pyproject.toml-style processing. See PEP 517 for details on pyproject.toml-style projects.

Content of configuration file (config.yml):


Content of domain file (domain.yml) (if used & relevant):

intents:
- greet
- goodbye
- thanks
- deny
- joke
- name


entities:
- name


slots:
  name:
    type: text


actions:
- utter_name
- utter_thanks
- utter_greet
- utter_goodbye
- action_joke


templates:
  utter_name:
  - text: "Hey there! Tell me your name."

  utter_greet:
  - text: "Nice to you meet you {name}. How can I help?"

  utter_goodbye:
  - text: "Talk to you later!"

  utter_thanks:
  - text: "My pleasure."


Most helpful comment

In case anyone faces the same issue, I was able to bypass this by installing httptools with conda first:
conda install -c conda-forge httptools

All 14 comments

Thanks for raising this issue, @MetcalfeTom will get back to you about it soon

Hi @mohit-sym,

Please downgrade pip. This error occurs with pip versions 19.1 and above.

how to downgrade pip which command should I used for downgrade pip versions 19.1 and above in anaconda or pycharm.
I am fresher on anaconda and pycharm.

Hi @MetcalfeTom , I tried with pip 19.0.0 and 10.0.0, the error did not change. Thanks.

Hi @MetcalfeTom , I tried with pip 10.0.0, the error did not change. Thanks. And error change into :

Collecting httptools
Using cached https://files.pythonhosted.org/packages/1b/03/215969db11abe8741e9c266a4cbe803a372bd86dd35fa0084c4df6d4bd00/httptools-0.0.13.tar.gz
Building wheels for collected packages: httptools
Running setup.py bdist_wheel for httptools ... error
Complete output from command /usr/bin/python3.6 -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-qome0gd6/httptools/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('rn', 'n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d /tmp/pip-wheel-2s6eu6jk --python-tag cp36:
running bdist_wheel
running build
running build_py
creating build
creating build/lib.linux-x86_64-3.6
creating build/lib.linux-x86_64-3.6/httptools
copying httptools/__init__.py -> build/lib.linux-x86_64-3.6/httptools
creating build/lib.linux-x86_64-3.6/httptools/parser
copying httptools/parser/__init__.py -> build/lib.linux-x86_64-3.6/httptools/parser
copying httptools/parser/errors.py -> build/lib.linux-x86_64-3.6/httptools/parser
running egg_info
writing httptools.egg-info/PKG-INFO
writing dependency_links to httptools.egg-info/dependency_links.txt
writing top-level names to httptools.egg-info/top_level.txt
reading manifest file 'httptools.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
writing manifest file 'httptools.egg-info/SOURCES.txt'
copying httptools/parser/parser.c -> build/lib.linux-x86_64-3.6/httptools/parser
running build_ext
building 'httptools.parser.parser' extension
creating build/temp.linux-x86_64-3.6
creating build/temp.linux-x86_64-3.6/httptools
creating build/temp.linux-x86_64-3.6/httptools/parser
creating build/temp.linux-x86_64-3.6/vendor
creating build/temp.linux-x86_64-3.6/vendor/http-parser
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/python3.6m -c httptools/parser/parser.c -o build/temp.linux-x86_64-3.6/httptools/parser/parser.o -O2
httptools/parser/parser.c:4:20: fatal error: Python.h: No such file or directory
compilation terminated.
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1


Failed building wheel for httptools
Running setup.py clean for httptools
Failed to build httptools
Installing collected packages: httptools
Running setup.py install for httptools ... error
Complete output from command /usr/bin/python3.6 -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-qome0gd6/httptools/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('rn', 'n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-record-oh0a1qin/install-record.txt --single-version-externally-managed --compile --user --prefix=:
running install
running build
running build_py
creating build
creating build/lib.linux-x86_64-3.6
creating build/lib.linux-x86_64-3.6/httptools
copying httptools/__init__.py -> build/lib.linux-x86_64-3.6/httptools
creating build/lib.linux-x86_64-3.6/httptools/parser
copying httptools/parser/__init__.py -> build/lib.linux-x86_64-3.6/httptools/parser
copying httptools/parser/errors.py -> build/lib.linux-x86_64-3.6/httptools/parser
running egg_info
writing httptools.egg-info/PKG-INFO
writing dependency_links to httptools.egg-info/dependency_links.txt
writing top-level names to httptools.egg-info/top_level.txt
reading manifest file 'httptools.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
writing manifest file 'httptools.egg-info/SOURCES.txt'
copying httptools/parser/parser.c -> build/lib.linux-x86_64-3.6/httptools/parser
running build_ext
building 'httptools.parser.parser' extension
creating build/temp.linux-x86_64-3.6
creating build/temp.linux-x86_64-3.6/httptools
creating build/temp.linux-x86_64-3.6/httptools/parser
creating build/temp.linux-x86_64-3.6/vendor
creating build/temp.linux-x86_64-3.6/vendor/http-parser
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/python3.6m -c httptools/parser/parser.c -o build/temp.linux-x86_64-3.6/httptools/parser/parser.o -O2
httptools/parser/parser.c:4:20: fatal error: Python.h: No such file or directory
compilation terminated.
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1

Hi @MetcalfeTom , I tried with pip 10.0.0, the error did not change. Thanks. And error change into :

Collecting httptools
Using cached https://files.pythonhosted.org/packages/1b/03/215969db11abe8741e9c266a4cbe803a372bd86dd35fa0084c4df6d4bd00/httptools-0.0.13.tar.gz
Building wheels for collected packages: httptools
Running setup.py bdist_wheel for httptools ... error
Complete output from command /usr/bin/python3.6 -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-qome0gd6/httptools/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('rn', 'n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d /tmp/pip-wheel-2s6eu6jk --python-tag cp36:
running bdist_wheel
running build
running build_py
creating build
creating build/lib.linux-x86_64-3.6
creating build/lib.linux-x86_64-3.6/httptools
copying httptools/__init__.py -> build/lib.linux-x86_64-3.6/httptools
creating build/lib.linux-x86_64-3.6/httptools/parser
copying httptools/parser/__init__.py -> build/lib.linux-x86_64-3.6/httptools/parser
copying httptools/parser/errors.py -> build/lib.linux-x86_64-3.6/httptools/parser
running egg_info
writing httptools.egg-info/PKG-INFO
writing dependency_links to httptools.egg-info/dependency_links.txt
writing top-level names to httptools.egg-info/top_level.txt
reading manifest file 'httptools.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
writing manifest file 'httptools.egg-info/SOURCES.txt'
copying httptools/parser/parser.c -> build/lib.linux-x86_64-3.6/httptools/parser
running build_ext
building 'httptools.parser.parser' extension
creating build/temp.linux-x86_64-3.6
creating build/temp.linux-x86_64-3.6/httptools
creating build/temp.linux-x86_64-3.6/httptools/parser
creating build/temp.linux-x86_64-3.6/vendor
creating build/temp.linux-x86_64-3.6/vendor/http-parser
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/python3.6m -c httptools/parser/parser.c -o build/temp.linux-x86_64-3.6/httptools/parser/parser.o -O2
httptools/parser/parser.c:4:20: fatal error: Python.h: No such file or directory
compilation terminated.
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1


Failed building wheel for httptools
Running setup.py clean for httptools
Failed to build httptools
Installing collected packages: httptools
Running setup.py install for httptools ... error
Complete output from command /usr/bin/python3.6 -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-qome0gd6/httptools/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('rn', 'n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-record-oh0a1qin/install-record.txt --single-version-externally-managed --compile --user --prefix=:
running install
running build
running build_py
creating build
creating build/lib.linux-x86_64-3.6
creating build/lib.linux-x86_64-3.6/httptools
copying httptools/__init__.py -> build/lib.linux-x86_64-3.6/httptools
creating build/lib.linux-x86_64-3.6/httptools/parser
copying httptools/parser/__init__.py -> build/lib.linux-x86_64-3.6/httptools/parser
copying httptools/parser/errors.py -> build/lib.linux-x86_64-3.6/httptools/parser
running egg_info
writing httptools.egg-info/PKG-INFO
writing dependency_links to httptools.egg-info/dependency_links.txt
writing top-level names to httptools.egg-info/top_level.txt
reading manifest file 'httptools.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
writing manifest file 'httptools.egg-info/SOURCES.txt'
copying httptools/parser/parser.c -> build/lib.linux-x86_64-3.6/httptools/parser
running build_ext
building 'httptools.parser.parser' extension
creating build/temp.linux-x86_64-3.6
creating build/temp.linux-x86_64-3.6/httptools
creating build/temp.linux-x86_64-3.6/httptools/parser
creating build/temp.linux-x86_64-3.6/vendor
creating build/temp.linux-x86_64-3.6/vendor/http-parser
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/python3.6m -c httptools/parser/parser.c -o build/temp.linux-x86_64-3.6/httptools/parser/parser.o -O2
httptools/parser/parser.c:4:20: fatal error: Python.h: No such file or directory
compilation terminated.
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1

In case anyone faces the same issue, I was able to bypass this by installing httptools with conda first:
conda install -c conda-forge httptools

sudo apt-get install build-essential python3 python-dev python3-dev
then
pip install --no-cache-dir ujson
and rerun
pip install rasa-x --extra-index-url https://pypi.rasa.com/simple
solved the problem for me ; ubuntu 16.04 and python 3.6 on conda environment installing the version with rasa-x

I have this issue on windows 10 and python 3.6.4. What should I do?

I have this issue on windows 10 and python 3.7.
Can anyone revert as soon as possible?

Same problem here : Win10, brand new venv for rasa. After pip install rasa, I had several issues but basically fixed by running several time the install and upgrading pip... And now this issue with the httptools.parser.errors.
Please need help here :) Thanks

Could you create a new issue please, with details of your error messages, versions used etc?

I got this issue when i try to install rasa.
I resolved this issue by installing anaconda.
Go to Anaconda prompt and execute below command

conda install -c conda-forge httptools
pip install rasa

In case anyone faces the same issue, I was able to bypass this by installing httptools with conda first:
conda install -c conda-forge httptools

This is really helpful. Thanks a lottt!!! @bschoenhe

Was this page helpful?
0 / 5 - 0 ratings

Related issues

yondu22 picture yondu22  路  3Comments

rayush7 picture rayush7  路  3Comments

karnigili picture karnigili  路  3Comments

lomarceau picture lomarceau  路  3Comments

nahidalam picture nahidalam  路  3Comments