Configuring Pycharm to run Pyinstaller

Install pyinstaller in pycharm, then open the pycharm terminal and write python -m PyInstaller.


The PyInstaller package is a runnable module and can be run using python -m PyInstaller. To configure it as a run target in PyCharm, leave the "Script" field blank, write -m PyInstaller in the "Interpreter Options" field, and put the PyInstaller parameters into the "Script Parameters" field.

For example:

pyinstaller pycharm configuration

PyCharm will complain that the "Script" field is empty, but it will let you run the configuration anyway.


After more than two years, perhaps there is a better option.

In the PyCharm menu go to File -> Settings.
In the Settings dialog find Tools -> External tools and use the green + to add a new external tool.

For example:

enter image description here

Then, the IDE will allow you to run it on any python script. Right click on the file and the context menu will show External tools -> PyInstaller.


The run command has changed a bit since the accepted answer. You can now select a module to launch rather than editing the interpreter options.

As of writing this answer, here is how it looks like:

enter image description here

Notes:

  • This solution requires to install PyInstaller in the virtual environment of the project.
  • I am using PyCharm pro 2020.1
  • Old solution should still work
  • Using external tool is still a possibility. Which solution you choose is a matter of personal preference.