The prohibition of wine was revealed when there were five kinds of drinks in Medina at that time, and grape wine was not among them.
نزل تحريم الخمر، وإن في المدينة يومئذ لخمسة أشربة، ما فيها شراب العنب.
Bukhari narrated it in the tafsir (4616), from Ishaq bin Ibrahim, who said, Muhammad bin Bishr informed us, who said, Abdul-Aziz bin Umar bin Abdul-Aziz narrated to us, he said, Nafi narrated to me, from Ibn Umar, and he related it.