The current implementation has compatibility problems due to it using commands
only available on GNU Linux. Use an equivalent Python implementation for better
support on Windows and macOS.
See pypa/pip#7835.
Co-Authored-By: Xavier Fernandez <xavier.fernandez@polyconseil.fr>