"crank position variation not learned"

Hello all,
I just picked up this car and it runs fine but then will run real rough at idle then stall. Sometimes it does this, sometimes not, but basically will do it on every trip out.
I see that the actual sensor is behind the engine, near the starter. Looks like a bear to remove.
Question...do I replace the sensor or take it to a shop and see if they can make it "learn" instead? Sounds like a calibration procedure to me. It does look like the computer was replaced in this car, and maybe they never went through those motions after replacing it.
Is it hard to replace the sensor? Does the starter have to come out to do so?
Thanks!