BLD: Install dependencies if cannot be imported.