For transport within the Paris region (Île-de-France), definitely buy there
If you're there for a full calendar week, you can't beat Navigo. Things get nuanced for shorter periods, depending on how often you're on the train and how much you value convenience.