Reduce required Python dependencies Add a method for installing dependencies as needed Install missing optional dependencies as needed Transition some required dependencies into optional ones This resolves #1406