What is the primary purpose of pip's dependency resolver in Python package management?
A) To automatically update all installed packages to their latest versions
B) To ensure that all required packages and their compatible versions are installed for a specific project
C) To remove unused packages from the system
D) To convert packages from one format to another