Has to be near an opponent. Also, WTH would you want to do this? Isn't part of the enjoyment having it level up due to your work? I could maybe understand cheating on your 2nd or 3rd runthrough I guess.
Edit: I assume you mean to level up when you say "practice." If not, disregard my response. You can cast these spells anywhere.