简体   繁体   English

在Mac上安装PyInstaller

[英]Installing PyInstaller on Mac

I have not seen this issue in my google searches. 我在Google搜索中没有看到此问题。 I am trying to install PyInstaller on my work Mac which I do not have administrative access. 我试图在没有管理访问权限的工作Mac上安装PyInstaller。

    $ 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: 我必须从这里安装tar.gz文件:

http://www.pyinstaller.org/downloads.html 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 . 在我的Mac pip上,将二进制文件安装在/Users/%Username%/Library/Python/2.7/bin If you add that to your PATH it should work. 如果将其添加到您的PATH中,它将正常工作。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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