22

(I'm on Windows.)

I want to use PyInstaller. I could always create bin files with pyinstaller.py [args].

  • It's not a package with an __init__.py file,
  • it has no setup.py
  • and it doesn't work to create a folder, put it in my PYTHONPATH, put pyinstaller\[files] in that folder and then make a call to python pyinstaller\pyinstaller.py.

pyinstaller.org only tells me something with Configure.py.

So now I'm out of ideas how to install PyInstaller so that I don't have to work with absolute paths. Do you have any ideas?

rynd
  • 1,865
  • 5
  • 22
  • 24
  • Have you read the complete documentation of PyInstaller and followed the steps it has mentioned. It seems it has a pretty detailed [documentation](http://www.pyinstaller.org/export/d3398dd79b68901ae1edd761f3fe0f4ff19cfb1a/project/doc/Manual.html?format=raw). – RanRag May 26 '12 at 14:22
  • I m confused, do you want to install, or create an installer ? – jlengrand May 26 '12 at 14:26
  • 1
    I want to make pyinstaller ready to be called from within a script in a repostitory (without absolute paths or having it in the repository). – rynd May 26 '12 at 14:31
  • @RanRag: I ran `python Configure.py` as described and then called `python Makespec.py --help` from another directory. But it says: `python: can't open file 'makespec.py': [Errno 2] No such file or directory`. – rynd May 26 '12 at 14:36

3 Answers3

39

To install PyInstaller:

  1. Go to your command prompt (Start -> Run -> cmd)
  2. type the following command cd c:\python27\scripts press enter, this should be where your pip.exe file is located.
  3. Once you are in this directory type pip install pyinstaller press enter

Message should read Successfully installed pyinstaller.

Mathias711
  • 6,568
  • 4
  • 41
  • 58
Developer
  • 761
  • 7
  • 12
  • 4
    +1 because of details about which directory, which isn't transparent to the noob. – eric Mar 25 '14 at 19:06
  • There is no `pip.exe` under `~/.wine/drive_c/Python26/Scripts/`! PS: I am on wine in Ubuntu. – SparkAndShine Feb 23 '16 at 17:48
  • I can't find pip.exe in `C:\Python27\Scripts\` folder – Hrvoje T May 27 '16 at 07:05
  • 2
    If you have Python 2 >=2.7.9 or Python 3 >=3.4 installed from python.org, you will already have pip and setuptools, If you don't then have a look at this link https://packaging.python.org/installing/#install-pip-setuptools-and-wheel and follow the steps. Where it says "Securely Download get-pip.py" click on that link, once it opens right click on the page and save the file to your computer. Once you save the file double click on it and it should install pip. – Developer Jul 21 '16 at 15:11
8

To install pyInstaller you must first run python Configure.py in the pyInstaller directory. To create an exe you must copy the script to the pyInstaller directory, and run python Makespec.py script.py after you have run that run python Build.py script/script.spec (these commands assume you have the python directory in your path, the command prompt is in the pyInstaller directory and that your script is called script.py.)

Python Kid
  • 313
  • 2
  • 7
  • 19
  • This seems really convoluted. Surely there's an easier way involving `pip` or some such – fatuhoku Oct 23 '13 at 09:46
  • I have no idea if there is, but that's how I got it to work – Python Kid Oct 23 '13 at 16:24
  • I got similar problem. Fix problem with a command 'pyinstaller --hidden-import packaging --hidden-import packaging.version --hidden-import packaging.specifiers --hidden-import packaging.requirements'. – Hill Apr 04 '16 at 06:59
6

I was able to install PyInstaller using pip.

pip install pyinstaller
dmdewey
  • 199
  • 1
  • 6