简体   繁体   中英

Installing PyInstaller on Mac

I have not seen this issue in my google searches. I am trying to install PyInstaller on my work Mac which I do not have administrative access.

    $ pip install --user pyinstaller
    Collecting pyinstaller
    Requirement already satisfied: dis3 in ./Library/Python/2.7/lib/python/site-packages (from pyinstaller)
    Requirement already satisfied: setuptools in ./Library/Python/2.7/lib/python/site-packages (from pyinstaller)
    Requirement already satisfied: macholib>=1.8 in ./Library/Python/2.7/lib/python/site-packages (from pyinstaller)
    Requirement already satisfied: pefile>=2017.8.1 in ./Library/Python/2.7/lib/python/site-packages (from pyinstaller)
    Requirement already satisfied: altgraph>=0.15 in ./Library/Python/2.7/lib/python/site-packages (from macholib>=1.8->pyinstaller)
    Requirement already satisfied: future in ./Library/Python/2.7/lib/python/site-packages (from pefile>=2017.8.1->pyinstaller)
    Installing collected packages: pyinstaller
    Successfully installed pyinstaller-3.3.1

The install seems successful, however...

    $ pyinstaller
    -bash: pyinstaller: command not found

I checked my PATH

    $ echo $PATH
    /usr/local/git/current/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin:/usr/local/share/dotnet:/Library/Frameworks/Mono.framework/Versions/Current/Commands:/Users/jc/Library/Python/2.7/lib/python/site-packages

What am I missing here?

Thanks for reading.

I had to install the tar.gz file from here:

http://www.pyinstaller.org/downloads.html

Then it can be run from the extracted folder.

    $ python pyinstaller.py script.py

On my Mac pip installed the binary in /Users/%Username%/Library/Python/2.7/bin . If you add that to your PATH it should work.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM