Short period, high field undulators are used to produce hard X-rays on synchrotron radiation based storage ring facilities of intermediate energy and enable short wavelength Free Electron Laser. Cryogenic permanent magnet undulators take benefit from improved magnetic properties of RE2Fe14B (Rare Earth based magnets) at low temperatures for achieving short period, high magnetic field and high coercivity. Using Pr2Fe14B instead of Nd2Fe14B, which is generally employed for undulators, avoids the limitation caused by the Spin Reorientation Transition phenomenon, and simplifies the cooling system by allowing the working temperature of the undulator to be directly at the liquid nitrogen one (77 K). We describe here the development of a full scale (2 m), 18 mm period Pr2Fe14B cryogenic permanent magnet undulator (U18). The design, construction and optimization, as well as magnetic measurements and shimming at low temperature are presented. The commissioning and operation of the undulator with the electron beam and spectrum measurement using the Nanoscopmium beamline at SOLEIL are also reported.