
Pete Doherty had been stopped by police in Kensington High Street, London, on 5 May.
Judge Davinder Lachlar adjourned the case for four weeks for assessment of Pete Doherty, who is said to be attending a detox programme.
The judge did not fine Pete Doherty or impose a custodial sentence just yet, saying that it was too early to see the results of his detoxification programme, but he warned: "What I have in mind is a community order or prison... if he does not show his motivation, it's prison - it's as simple as that."
Pete Doherty, who attended the hearing accompanied by his mother, was released on conditional bail and his case next comes up for pre-sentence hearing on 4 September.