He had grown some plants but did not know how to process the oil so had to find someone else to do it for him, Mr Taffs said.
Andrews' situation was still poor and he was scheduled for more surgery next week.
Judge Jane Farish said Andrews posed a difficult situation for the court because of the way he had obtained the cannabis.
While the role of cannabis oil in medical treatment had been recognised, and it was partly legalised, the proper channels to obtain it had been proscribed, she said.
However, she told Andrews that due to his "dismal situation" the court could be merciful.
Judge Farish said the court would normally impose a deterrent sentence. However, she was ordering Andrews to reappear for sentencing if called upon within six months.
Andrews also admitted possessing ammunition without lawful purpose.
Mr Taffs said the ammunition "dated back to a Vickers machine gun in World War I".
Andrew only had it out of curiosity and had no gun to use the bullets, Mr Taffs said.
Judge Farish concurred, declaring she knew "something of ammunition herself".
She convicted Andrews on the charge and ordered the ammunition destroyed.