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.
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.

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.
Configuring Pycharm to run Pyinstaller
Yes I want to create a run configuration in PyCharm to run Pyinstaller and get my executable. According to the Pyinstaller documentation you should be able to locate an python script called pyinstaller-folder/pyinstaller.py after the installation, but it wasn’t there. Then I look carefully and found this other one named pyinstaller-folder/__main__.py which should be the same <—(me wild guessing), so I set up my running configuration like this:

After running it, is giving me this error:
It seems to require a parent module to run but, how would that look like?
6 Answers 6
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.

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 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.

PyCharm will complain that the «Script» field is empty, but it will let you run the configuration anyway.
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:

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.
Install pyinstaller in pycharm, then open the pycharm terminal and write python -m PyInstaller .
So as Pycharm has newly updates, my case was a bit different as I installed pyinstaller from the interpreter settings as the following picture shows:

For Linux Users:
You could install it in both Python 2.7 or Python 3.7+ . Make sure to get the path of where pyinstaller was stored.Then in the Settings option, try to find Tools -> External tools and add a new external tool as the following picture shows: 
For Windows users:
If you are using Pycharm or any virtual environment. Unfortunatelly Pycharm creates its local vertual environment in venv path once you indicate the interpreter . So, you should set the external tool (pyinstaller) to the real path of your python 3.7 .exe as the picture shows 
Настройка Pycharm для запуска Pyinstaller
Да, я хочу создать конфигурацию запуска в PyCharm для запуска Pyinstaller и получения исполняемого файла. Согласно документации по Pyinstaller, вы сможете найти скрипт Python под названием pyinstaller-folder/pyinstaller.py после установки, но его там не было. Затем я внимательно посмотрел и нашел еще один с именем pyinstaller-folder/__main__.py , который должен быть таким же 25
6 ответов
Пакет PyInstaller — это работающий модуль, который можно запустить с помощью python -m PyInstaller . Чтобы настроить его как цель запуска в PyCharm, оставьте поле «Сценарий» пустым, введите -m PyInstaller в поле «Параметры интерпретатора» и поместите параметры PyInstaller в поле «Параметры сценария».

PyCharm будет жаловаться, что поле «Script» пустое, но оно все равно позволит вам запустить конфигурацию.
После более чем двух лет, возможно, есть лучший вариант.
В меню PyCharm выберите Файл -> Настройки .
В диалоговом окне «Настройки» найдите Инструменты -> Внешние инструменты и используйте зеленый +, чтобы добавить новый внешний инструмент.

Затем IDE позволит вам запустить его на любом скрипте Python. Щелкните файл правой кнопкой мыши, и в контекстном меню отобразятся Внешние инструменты -> PyInstaller .
Так как у Pycharm недавно появились обновления, мой случай немного отличался, поскольку я установил pyinstaller из настроек интерпретатора, как показано на следующем рисунке:

Для пользователей Linux .
Вы можете установить его как в Python 2.7 , так и в Python 3.7+ . Убедитесь, что вы указали путь, по которому хранился pyinstaller . Затем в разделе «Настройки» попробуйте найти Инструменты -> Внешние инструменты и добавьте новый внешний инструмент, как показано на следующем рисунке:
Для пользователей Windows :
Если вы используете Pycharm или любую виртуальную среду. К сожалению, Pycharm создает свою локальную вертикальную среду по пути venv , когда вы указываете interpreter . Итак, вы должны установить внешний инструмент (pyinstaller) на реальный путь вашего python 3.7 .exe, как показано на рисунке
Установите pyinstaller в pycharm, затем откройте терминал pycharm и напишите python -m PyInstaller .
Настройка Pycharm для запуска Pyinstaller
Да, я хочу создать конфигурацию запуска в PyCharm, чтобы запустить Pyinstaller и получить свой исполняемый файл. Согласно документации Pyinstaller, вы должны быть в состоянии найти скрипт python с именем pyinstaller-folder/pyinstaller.py после установки, но его там не было. Затем я внимательно посмотрел и обнаружил еще одну pyinstaller-folder/__main__.py именем pyinstaller-folder/__main__.py которая должна быть такой же <- (я догадываюсь), поэтому я настроил свою рабочую конфигурацию так:

После запуска выдает эту ошибку:
Кажется, для запуска требуется родительский модуль, но как это будет выглядеть?
5 ответов
Пакет PyInstaller является исполняемым модулем и может быть запущен с помощью python -m PyInstaller . Чтобы настроить его как цель запуска в PyCharm, оставьте поле «Script» пустым, напишите -m PyInstaller в поле «Параметры интерпретатора» и поместите параметры PyInstaller в поле «Script Parameters».

PyCharm будет жаловаться, что поле «Script» пуст, но оно все равно позволит вам запустить конфигурацию.
После более чем двух лет, возможно, есть лучший вариант.
В меню PyCharm перейдите в Файл → Настройки.
В диалоговом окне «Настройки» найдите «Инструменты → Внешние инструменты» и используйте зеленый +, чтобы добавить новый внешний инструмент.

Затем IDE позволит вам запустить его на любом скрипте Python. Щелкните правой кнопкой мыши по файлу, и в контекстном меню появятся Внешние инструменты → PyInstaller.
Так как у Pycharm недавно появились обновления, мой случай немного отличался, поскольку я установил pyinstaller из настроек интерпретатора, как показано на следующем рисунке:

Для пользователей Linux:
Вы можете установить его как в Python 2.7 и в Python 3.7+ . Убедитесь, что pyinstaller нашли путь к pyinstaller хранения pyinstaller Затем в параметре «Настройки» найдите «Инструменты → Внешние инструменты» и добавьте новый внешний инструмент, как показано на следующем рисунке: 
Для пользователей Windows:
Если вы используете Pycharm или любую виртуальную среду. К сожалению, Pycharm создает свою локальную вертикальную среду на пути venv только вы указываете interpreter . Итак, вы должны установить внешний инструмент (pyinstaller) на реальный путь вашего python 3.7.exe, как показано на рисунке 