0

I am using Python 3.6.0

python --version
Python 3.6.0

I am trying to install pyinstaller using pip to a custom folder

pip install pyinstaller --target=/prj/qc-tools/lib/pyinstaller
Collecting pyinstaller
Collecting setuptools (from pyinstaller)
  Using cached setuptools-36.3.0-py2.py3-none-any.whl
Installing collected packages: setuptools, pyinstaller
Successfully installed pyinstaller-3.2.1 setuptools-36.3.0

The folder doesn't have a pyinstaller.py in it.

ls
easy_install.py  pkg_resources  __pycache__  PyInstaller  PyInstaller-3.2.1.dist-info  setuptools  setuptools-36.3.0.dist-info

The documentation on pyinstaller.org does not say anything more. What do I do?

shikhanshu
  • 1,466
  • 2
  • 16
  • 32
  • why do you think there should by `pyinstaller.py` in the first place? Try to `import PyInstaller` from python console, does it work? – 9dogs Aug 29 '17 at 19:38
  • The reason I think pyinstaller.py should exist is because pyinstaller.org says so - The equivalent of the pyinstaller command is pyinstaller-folder/pyinstaller.py. Yes, I can import PyInstaller from console, but how do I go about using it that way? How do I convert a python script into a standalone executable using it? – shikhanshu Aug 29 '17 at 20:32
  • 1
    it seems that using `--target` prevents pip from creating entry scripts. See [this answer](https://stackoverflow.com/a/29103053/5827010) for details. Anyway, a [content of `pyinstaller.py` is trivial](https://github.com/pyinstaller/pyinstaller/blob/develop/pyinstaller.py) – 9dogs Aug 29 '17 at 20:48
  • That's what I was thinking. Thanks for also pointing to content of pyinstaller.py! But I ended up downloading the tar.bz2 from pypi. That works just fine! – shikhanshu Aug 29 '17 at 21:00

2 Answers2

1

pip is for python2 and pip3 is for python3. You should install pip3 and try the command pip3 install pyinstaller --target=/prj/qc-tools/lib/pyinstaller

AllenMoh
  • 476
  • 2
  • 13
  • No. In my installation, pip is a symbolic link to pip3. I have tried pip and pip3 anyway and have the same issue. – shikhanshu Aug 29 '17 at 20:28
0

I ended up NOT using pip install. I downloaded the tarball from pypi, just extracted contents, and I am able to use pyinstaller.py directly to convert my scripts into executables.

shikhanshu
  • 1,466
  • 2
  • 16
  • 32