Some Linux OS' have a service called dirhelper that will delete the files in the temporary directory while pip is running. This can cause pip to fail with a number of different error messages claiming that certain files may be missing from your environment's temp directory.
Any job seeing this issue can have this step added to it to disable the service:
name: Disable dirhelper
command: sudo launchctl unload /System/Library/LaunchDaemons/com.apple.bsd.dirhelper.plist