Mark 2 points on parallel walls directly opposite each other
Why not buy the pipe, and make the marks based on that. That is, have a level, hold the pipe up and level it, then mark where it touches the wall. A friend would help, so might hanging or otherwise supporting the pipe from either above or below as you do this.