Accuracy of photometric redshifts for future weak lensing surveys from space