Installation error

Hi, when I’m trying to install pip3 install rasa_core==0.12.7 it is getting an error like below. Please help me what to do for that

ERROR: Command errored out with exit status 1: ** command: /usr/bin/python3 -u -c ‘import sys, setuptools, tokenize; sys.argv[0] = ‘"’"’/tmp/pip-install-e56sd7o8/regex/setup.py’"’"’; file_=’"’"’/tmp/pip-install-e56sd7o8/regex/setup.py’"’"’;f=getattr(tokenize, ‘"’"‘open’"’"’, open)(_file);code=f.read().replace(’"’"’\r\n’"’"’, ‘"’"’\n’"’"’);f.close();exec(compile(code, file, ‘"’"‘exec’"’"’))’ bdist_wheel -d /tmp/pip-wheel-nbsao13h --python-tag cp36** ** cwd: /tmp/pip-install-e56sd7o8/regex/** ** Complete output (23 lines):** ** BASE_DIR is /tmp/pip-install-e56sd7o8/regex** ** /usr/lib/python3/dist-packages/setuptools/dist.py:333: UserWarning: Normalizing ‘2019.08.19’ to ‘2019.8.19’** ** normalized_version,** ** 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/regex** ** copying regex_3/regex/init.py -> build/lib.linux-x86_64-3.6/regex** ** copying regex_3/regex/regex.py -> build/lib.linux-x86_64-3.6/regex** ** copying regex_3/regex/_regex_core.py -> build/lib.linux-x86_64-3.6/regex** ** creating build/lib.linux-x86_64-3.6/regex/test** ** copying regex_3/regex/test/init.py -> build/lib.linux-x86_64-3.6/regex/test** ** copying regex_3/regex/test/test_regex.py -> build/lib.linux-x86_64-3.6/regex/test** ** running build_ext** ** building ‘regex._regex’ extension** ** creating build/temp.linux-x86_64-3.6** ** creating build/temp.linux-x86_64-3.6/regex_3** ** 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 regex_3/_regex.c -o build/temp.linux-x86_64-3.6/regex_3/_regex.o** ** regex_3/_regex.c:48:20: fatal error: Python.h: No such file or directory** ** compilation terminated.** ** error: command ‘x86_64-linux-gnu-gcc’ failed with exit status 1** ** ----------------------------------------** ** ERROR: Failed building wheel for regex** ** Running setup.py clean for regex** Failed to build regex Installing collected packages: regex, PyInquirer, rasa-core, PyJWT ** Found existing installation: regex 2016.1.10** ERROR: Cannot uninstall ‘regex’. It is a distutils installed project and thus we cannot accurately determine which files belong to it which would lead to only a partial uninstall.emphasized text

Try installing the libraries with pip install --force-reinstall <package_ name> or pip install --ignore-installed <package_name>.

Keep in mind that --force-reinstall will forcefully reinstall every package and --ignore-install will ignore current installation and install over it, if the package name changes you might have 2 instances of the same package. See more details here

when i try to install :pip3 install --force-reinstall regex it is getting the error same as above and when i try to install:pip3 install --ignore-installed regex ,I’m getting the following error.what can i do for that?

ERROR: Command errored out with exit status 1: command: /usr/bin/python3 -u -c ‘import sys, setuptools, tokenize; sys.argv[0] = ‘"’"’/tmp/pip-install-uxidqfg/regex/setup.py’"’"’; file=’"’"’/tmp/pip-install-_uxidqfg/regex/setup.py’"’"’;f=getattr(tokenize, ‘"’"‘open’"’"’, open)(_file);code=f.read().replace(’"’"’\r\n’"’"’, ‘"’"’\n’"’"’);f.close();exec(compile(code, file, ‘"’"‘exec’"’"’))’ install --record /tmp/pip-record-tfo89wmm/install-record.txt --single-version-externally-managed --compile cwd: /tmp/pip-install-_uxidqfg/regex/ Complete output (23 lines): BASE_DIR is /tmp/pip-install-_uxidqfg/regex /usr/lib/python3/dist-packages/setuptools/dist.py:333: UserWarning: Normalizing ‘2019.08.19’ to ‘2019.8.19’ normalized_version, 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/regex copying regex_3/regex/init.py -> build/lib.linux-x86_64-3.6/regex copying regex_3/regex/regex.py -> build/lib.linux-x86_64-3.6/regex copying regex_3/regex/_regex_core.py -> build/lib.linux-x86_64-3.6/regex creating build/lib.linux-x86_64-3.6/regex/test copying regex_3/regex/test/init.py -> build/lib.linux-x86_64-3.6/regex/test copying regex_3/regex/test/test_regex.py -> build/lib.linux-x86_64-3.6/regex/test running build_ext building ‘regex._regex’ extension creating build/temp.linux-x86_64-3.6 creating build/temp.linux-x86_64-3.6/regex_3 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 regex_3/_regex.c -o build/temp.linux-x86_64-3.6/regex_3/_regex.o regex_3/_regex.c:48:20: fatal error: Python.h: No such file or directory compilation terminated. error: command ‘x86_64-linux-gnu-gcc’ failed with exit status 1 ---------------------------------------- ERROR: Command errored out with exit status 1: /usr/bin/python3 -u -c ‘import sys, setuptools, tokenize; sys.argv[0] = ‘"’"’/tmp/pip-install-uxidqfg/regex/setup.py’"’"’; file=’"’"’/tmp/pip-install-_uxidqfg/regex/setup.py’"’"’;f=getattr(tokenize, ‘"’"‘open’"’"’, open)(_file);code=f.read().replace(’"’"’\r\n’"’"’, ‘"’"’\n’"’"’);f.close();exec(compile(code, file, ‘"’"‘exec’"’"’))’ install --record /tmp/pip-record-tfo89wmm/install-record.txt --single-version-externally-managed --compile

The error looks like you don’t have python development packages.
I assume you’re on Ubuntu. try installing the following the packages

sudo apt-get install python-dev # for python2.x installs
sudo apt-get install python3-dev # for python3.x

And then try running the above mentioned command.

1 Like