Turbomachine such as an aircraft turbojet comprising an electrical generator/starter (26) that can be mounted and dismounted by axial translation in an upstream enclosure (18) of the turbomachine between the low-pressure compressor and the high-pressure compressor, and couple to electrical cables (34) which extend inside the structural arms (12) of the intermediate casing (10) of the turbomachine.