Depends on how long the window receives direct sun. You will also have to contend with people seeing it, daylight hours, cloudy days, covering it for forced flowering, stretching etc. I think it would be better in most circumstances to at least use fluoros in a grow box of some kind.