# How to fix fatal error: Python.h: No such file or directory?

This error typically occurs when the development headers for Python are not installed on your system. To fix this error, you need to install the python-dev package, which contains the necessary headers.

On Ubuntu or Debian:

```bash
sudo apt-get install python-dev
```

On CentOS or Red Hat:

```bash
sudo yum install python-devel
```

On Windows:
You need to install the Visual C++ Build Tools and then install the python development package using pip

```bash
pip install --upgrade setuptools
pip install --upgrade wheel
pip install --upgrade python-dev
```

Once you have installed the development headers, you should be able to run your script without encountering the fatal error.

[ad-logs]