regex_3/_regex.c:46:20: fatal error: Python.h: No such file or directory
If you are experiencing errors like the one above while trying to install regex via pip3.6, it basically means that the gcc needs the python.h header file for compilation and it's currently missing so you will have to install the python3.6-dev package to solve this problem.
Solution:
Follow the steps below to solve the above problem:
sudo add-apt-repository ppa:fkrull/deadsnakes
sudo apt-get update
sudo pip3.6 install regex
ref: https://www.cyberciti.biz/faq/debian-ubuntu-linux-python-h-file-not-found-error-solution/
For what OS is this?
I get:~$ add-apt-repository ppa:fkrull/deadsnakes
Traceback (most recent call last):
File "/usr/bin/add-apt-repository", line 11, in
from softwareproperties.SoftwareProperties import SoftwareProperties, shortcut_handler
File "/usr/lib/python3/dist-packages/softwareproperties/SoftwareProperties.py", line 27, in
import apt_pkg
ModuleNotFoundError: No module named 'apt_pkg'