What if two python packages have different versions of package dependencies?

This question depends on the package manager you use and how it resolves dependency conflicts. If you're using the standard package manager (pip), then it should let you know if this type of error occurs. The way pip works is by a process known as "backtracking", which essentially works "backwards" from the latest version to find the most recent version that a package is compatible with. In the event that two packages ask for conflicting versions of another package, you get what's known as a ResolutionImpossible error, which will cancel the installation process. This can generally only be resolved by either forcing pip to choose a specific version or updating the requirements.txt files of the packages you're trying to install. conda works in a similar way, though it will often resort to installing the latest version and then warning you instead of the error that pip throws out.