Try coiling insulated wire around the pipe, continuously until the needed length is covered plus a little extra (I would use 2 pipe diameters on each end, with a minimum of 6 inches <15 cm>) Pass a DC current through the coil, then halve the value of current and reverse the polarity, repeat this several times (6-10 should be Good)for 3-10 minutes each time halve and reverse current each time. Do not exceed the current rating of your wire, use a variable voltage power source (A welder should do nicely) and use ohms law V=IR (Volts=Amps x Ohms) to determine voltage settings (If necessary insert a resistor in the circuit to limit the voltage, an incandescent light bulb should work in a pinch). Borrow a multimeter to check Voltages and Resistances. This should De-Perm your pipe.
If the problem is from Induced magnetism this won't help in that case try to move the pipe out of the Electromagnetic field causing the problem.
Good Luck, -Dan76