^ I've seen a girl wear pants in several manga & anime over the years so It's not unknown in the medium - but I can't see it being allowed in many schools there- except maybe some relaxed sorts with no uniform code at all. Are there really some schools with no dress code, beyond the clothes being decent? You get them in manga.
^Manga is fiction after all. There has been a movement recently to let girls wear pants as part of their uniform in Japan, but as far as I know only one school instituted it yet. Though yes, there are lax schools without dress code everywhere, even in Japan I suppose. Probably more in rural regions tho.