The OS-packaged Python version is designed to support the OS-packaged Python applications. No more, no less. The whole point of having a software distribution is that it's curated such that it all works together. Your code? Not curated, so no guarantees. Module Y? Maybe curated, maybe not.
Getting "running code on the server" is an edge case, not the primary goal.
Want to run X ruby gem or Y python module in your codebase? Better hope it works with the antiquated version of python or ruby on the OS.