Blender 2.8 DECALmachine PIL not installing on Windows
Blender doesn't use your system's Python interpreter by default. That would require the use of --python-use-system-env in Blender 2.82 and later (see this answer for more information). Additionally your system's Python interpreter and modules would need to be compatible with the version Blender expects. Blender 2.82 use Python 3.7.4. 

While it's unclear why DECALmachine fails to install Pillow, it shouldn't be necessary to use your system's Python interpreter. The script below will try to install the package and import the module.


Start Blender and open the Scripting workspace
Create a new text block (Text > New)
Copy and paste the script into the text editor
Open the console (Window > Toggle System Console)
Run the script and check the output of the console for errors.




import bpy
import os
import ensurepip
import subprocess


try:
    import PIL
except ImportError:
    # The import failed, therefore we check that pip is available and attempt to install the package.

    # ensurepip.bootstrap() also calls pip, which adds the environment variable PIP_REQ_TRACKER. After 
    # ensurepip.bootstrap() finishes execution, the directory doesn't exist anymore. However, when subprocess 
    # is used to call pip, in order to install a package, the environment variables still contain 
    # PIP_REQ_TRACKER with the now nonexistent path. This is a problem since pip checks if PIP_REQ_TRACKER is 
    # set and if it is, attempts to use it as temp directory. This would result in an error because the 
    # directory couldn't be found. Therefore, PIP_REQ_TRACKER needs to be removed from os.environ.
    ensurepip.bootstrap()
    os.environ.pop("PIP_REQ_TRACKER", None)

    # Try to install the package. This may fail with subprocess.CalledProcessError
    subprocess.run([bpy.app.binary_path_python, "-m", "pip", "install", "Pillow"], check=True)
    import PIL


print(PIL.__version__)


A more generic version that allows install packages in a simple way:

import bpy


def ensure_and_import_module(module_name, package_name=None, global_name=None):
    """
    Ensures that the required package is installed and imports the module. It will attempt to install the package
    through pip if the import of the module fails.
    :param module_name: Module to import.
    :param package_name: (Optional) Name of the package that needs to be installed. If None it is assumed to be equal
       to the module_name.
    :param global_name: (Optional) Name under which the module is imported. If None the module_name will be used.
       This allows to import under a different name with the same effect as e.g. "import numpy as np" where "np" is
       the global_name under which the module can be accessed.
    :raises: subprocess.CalledProcessError and ImportError
    """
    import os
    import sys
    import importlib
    import ensurepip
    import subprocess

    if package_name is None:
        package_name = module_name

    if global_name is None:
        global_name = module_name

    try:
        # Attempt to import the module and assign it to globals dictionary. This allow to access the module under
        # the given name, just like the regular import would.
        globals()[global_name] = importlib.import_module(module_name)
    except ImportError:
        # The import failed, therefore we check that pip is available and attempt to install the package.

        # ensurepip.bootstrap() also calls pip, which adds the environment variable PIP_REQ_TRACKER. After 
        # ensurepip.bootstrap() finishes execution, the directory doesn't exist anymore. However, when subprocess 
        # is used to call pip, in order to install a package, the environment variables still contain 
        # PIP_REQ_TRACKER with the now nonexistent path. This is a problem since pip checks if PIP_REQ_TRACKER is 
        # set and if it is, attempts to use it as temp directory. This would result in an error because the 
        # directory couldn't be found. Therefore, PIP_REQ_TRACKER needs to be removed from os.environ.

        ensurepip.bootstrap()
        os.environ.pop("PIP_REQ_TRACKER", None)

        # Try to install the package. This may fail with subprocess.CalledProcessError
        subprocess.run([bpy.app.binary_path_python, "-m", "pip", "install", package_name], check=True)

        # The installation succeeded, attempt to import the module again
        globals()[global_name] = importlib.import_module(module_name)


# Make sure that Pillow is installed and PIL can be imported
ensure_and_import_module("PIL", "Pillow")
print(PIL.__version__)