From matplotlib version 2 on, there is no need to use latex (which will require a working latex installation). You can use regular MathText to render the part in bold.
import matplotlib.pyplot as plt
number = 2017
plt.title("This is title number: " + r"$\bf{" + str(number) + "}$")
plt.show()

source
share