Normally the PYTHONPATH environment variable can be used to add additional directories in front of the default import path. By default it is empty or not set, and the default import path is always added after any locations from PYTHONPATH. On Pythonista, PYTHONPATH contains all locations from the default import path, as if there were no default import locations and all locations were user-defined. It should really be emtpy, because all sys.path entries are provided by default, and none of them are set by the user.
Why does this matter? setuptools does some magic by installing a custom site.py under site-packages, which needs to find the real site.py module from the stdlib to work correctly. During this search it ignores any import locations from PYTHONPATH, which includes all import locations on Pythonista, meaning that nothing is searched at all and the import of site fails.