Auto install required packages if missing