Set of two machines comprising - at least a first rotary machine comprising a shaft and a rear bearing support having an opening into which a shaft end is fitted, the machine comprising a cover that is attached to the bearing support and can be removed in order to allow the bearing support to accommodate an assembly for attaching an encoder, the cover closing off the opening and comprising an annular lip that presses against the edge of the opening in order to attach the cover to the bearing support in a sealed manner, - at least a second rotary machine, which has the same construction as the first machine with the exception of the presence of the assembly for attaching an encoder and in which the cover has been removed in order to allow the bearing support to accommodate the assembly for attaching an encoder, the assembly for attaching an encoder being attached in a removable manner to the bearing support and to the shaft of the second rotary machine, the assembly comprising an end fitting, which is attached to the shaft end and drives a rotary portion of the encoder in rotation, and a sealing piece (70; 100) extending at least partially into the opening, the sealing piece (70; 100) being configured to be mounted in a removable manner on the bearing support and comprising an annular sealing lip (71, 103), the annular sealing lip being fitted in the opening and having sealing ribs on the surface thereof facing the shaft, or the assembly comprising an end piece that is coaxial with the sealing piece, the annular lip being radially interposed between the edge of the opening and the periphery of the end piece and having sealing ribs on the surface thereof that faces the end piece, the assembly comprising a cap in which the rotary portion of the encoder is housed, the cap bearing the connection technology for the encoder. - at least a first rotary machine comprising a shaft and a rear bearing support having an opening into which a shaft end is fitted, the machine comprising a cover that is attached to the bearing support and can be removed in order to allow the bearing support to accommodate an assembly for attaching an encoder, the cover closing off the opening and comprising an annular lip that presses against the edge of the opening in order to attach the cover to the bearing support in a sealed manner, - at least a second rotary machine, which has the same construction as the first machine with the exception of the presence of the assembly for attaching an encoder and in which the cover has been removed in order to allow the bearing support to accommodate the assembly for attaching an encoder, the assembly for attaching an encoder being attached in a removable manner to the bearing support and to the shaft of the second rotary machine, the assembly comprising an end fitting, which is attached to the shaft end and drives a rotary portion of the encoder in rotation, and a sealing piece (70; 100) extending at least partially into the opening, the sealing piece (70; 100) being configured to be mounted in a removable manner on the bearing support and comprising an annular sealing lip (71, 103), the annular sealing lip being fitted in the opening and having sealing ribs on the surface thereof facing the shaft, or the assembly comprising an end piece that is coaxial with the sealing piece, the annular lip being radially interposed between the edge of the opening and the periphery of the end piece and having sealing ribs on the surface thereof that faces the end piece, the assembly comprising a cap in which the rotary portion of the encoder is housed, the cap bearing the connection technology for the encoder.