An electric compressor comprising: a circuit board on which a plurality of switching elements that are configured to convert DC power supplied from an outside into AC power are mounted; a motor configured to be rotationally driven by the AC power output from the plurality of switching elements ; a compression mechanism which is configured to be driven by the motor and is configured to compress a fluid; a lead holding member disposed between element main bodies of the plurality of switching elements and the circuit board ; and a casing in which a driving circuit accommodation portion that accommodates the circuit board and the lead holding member is formed, the casing including an opening portion , wherein the element main bodies of the switching elements are fixed to the casing by fixing screws , wherein the circuit board includes a plurality of through-holes through which a plurality of leads that extend from the element main bodies are respectively inserted, wherein the lead holding member is provided to cover at least a part of the element main bodies from the side of the opening portion of the casing with respect to the plurality of switching elements in a state of being fixed to the casing in the driving circuit accommodation portion , and wherein the lead holding member includes lead insertion holes through which the plurality of leads are inserted such that positions of the plurality of leads are held at positions that correspond to positions of the through-holes of the circuit board , characterized in that the lead holding member has opening portions at positions that correspond to the fixing screws so as to expose the fixing screws . a circuit board on which a plurality of switching elements that are configured to convert DC power supplied from an outside into AC power are mounted; a motor configured to be rotationally driven by the AC power output from the plurality of switching elements ; a compression mechanism which is configured to be driven by the motor and is configured to compress a fluid; a lead holding member disposed between element main bodies of the plurality of switching elements and the circuit board ; and a casing in which a driving circuit accommodation portion that accommodates the circuit board and the lead holding member is formed, the casing including an opening portion , wherein the element main bodies of the switching elements are fixed to the casing by fixing screws , wherein the circuit board includes a plurality of through-holes through which a plurality of leads that extend from the element main bodies are respectively inserted, wherein the lead holding member is provided to cover at least a part of the element main bodies from the side of the opening portion of the casing with respect to the plurality of switching elements in a state of being fixed to the casing in the driving circuit accommodation portion , and wherein the lead holding member includes lead insertion holes through which the plurality of leads are inserted such that positions of the plurality of leads are held at positions that correspond to positions of the through-holes of the circuit board , characterized in that the lead holding member has opening portions at positions that correspond to the fixing screws so as to expose the fixing screws . <EOS>