Install necessary packages if necessary