Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to correctly install pyinstaller

I have attempted to install pyinstaller (on Ubuntu 16.0.4) using pip:

pip3 install pyinstaller

Collecting pyinstaller
  Using cached PyInstaller-3.2.tar.gz
Collecting setuptools (from pyinstaller)
  Using cached setuptools-25.1.3-py2.py3-none-any.whl
Building wheels for collected packages: pyinstaller
  Running setup.py bdist_wheel for pyinstaller ... done
  Stored in directory: /home/.../.cache/pip/wheels/fc/b3/10/006225b1c1baa34750a7b587d3598d47d18114c06b696a8e0e
Successfully built pyinstaller
Installing collected packages: setuptools, pyinstaller
Successfully installed pyinstaller setuptools-20.7.0
You are using pip version 8.1.1, however version 8.1.2 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.

However, if I then try to call pyinstaller I get the error pyinstaller: command not found

Why am I unable to run pyinstaller when the pip install appears to have been successful.

like image 558
218 Avatar asked Aug 03 '16 14:08

218


People also ask

Does PyInstaller work on Windows?

PyInstaller supports making executables for Windows, Linux, and macOS, but it cannot cross compile.

Is PyInstaller safe to use?

A group of researchers from the University of Piraeus in Greece said that PyInstaller, a tool intended to convert Python code into standalone applications, is capable of creating malware payloads that are able to slip past many of the most widely used antivirus programs and get their malicious code up and running ...


1 Answers

pyinstaller appears to have installed correctly, but the command is not available on PATH. You need to locate where the executable was placed. This will depend on your system configuration, if you're using virtualenv, and other system and usage dependent factors.

One thing you could try is using find to locate the executable:

sudo find / -name pyinstaller

This recursively looks for a file named pyinstaller, starting at the root of the file system. If you have some idea where the executable may have been placed, you can narrow the search to that directory.

Once you have the absolute path of the executable, you can either call it directly:

/my/path/to/pyinstaller

Or if you're not using virtualenv or anything, you could modify PATH to include the executable's parent directory:

$PATH = $PATH:/my/path/to

If you want to make that change permanent, you need to modify a script somewhere.

like image 135
jpmc26 Avatar answered Oct 24 '22 09:10

jpmc26