Python Forum
Create Python "Executable" from PyCharm?
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Create Python "Executable" from PyCharm?
#6
I got pyinstaller to work from the command line, but that's python 2.7.

Trying to get it to work in PyCharm wasn't as easy. Still stuck there.

In PyCharm, I installed PyInstaller and PyInstaller "hooks".

Then, I created a setup.py file with this:

import PyInstaller as pyinstaller
from binaryfilesearch import SearchBinaryFile
pyinstaller SearchBinaryFile.py
But, in this case, I got this:

pyinstaller SearchBinaryFile.py
                               ^
SyntaxError: invalid syntax
I don't need to create an executable on the Mac for all the code in the project, just this one py file. I'm probably close now.

Any ideas how to make PyInstaller work inside PyCharm?

Thanks,

(Jan-06-2018, 12:40 AM)snippsat Wrote:
(Jan-05-2018, 11:39 PM)Oliver Wrote: I'm thinking "executable JAR" -- where all the dependencies are in the JAR and I can run it like this:
The closest in python is wheel.
You make a wheel file that contain all dependencies.
So if you or some else will use this wheel(.whl) file,install it like this pip install wheel_name
I have tutorial about this here.

Oliver Wrote:I tried to install the separate Pyinstaller, but the pip install crashed.
What did you do,it's just pip install pyinstaller
Do it from command line,i know PyCharm has build in setup for this,but if error always command line.

Here i have a post with pyinstaller.
I always use virtual environment with Pyinstaller when there is a lot dependencies.
Then it make not difference if Pyinstaller crash on my OS,virtual environment is like a new Python installation.

pip install pyinstaller

crashed at the end.

I did finally get it to install.

Thank you.
Reply


Messages In This Thread
RE: Create Python "Executable" from PyCharm? - by Oliver - Jan-06-2018, 12:34 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  No hold('on') in pycharm python 3.7 Vedant 0 1,877 Sep-13-2019, 01:51 PM
Last Post: Vedant
  Python 3.6 to executable DeGerlash 14 18,038 Jan-16-2018, 01:49 PM
Last Post: DeGerlash

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020