我在谷歌搜索中没有看到这个问题。我正在尝试在我的工作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
安装似乎很成功,但是......
$ pyinstaller
-bash: pyinstaller: command not found
我检查了我的路径
$ 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
我在这里缺少什么?
感谢阅读。
答案 0 :(得分:0)
我必须从这里安装tar.gz文件:
http://www.pyinstaller.org/downloads.html
然后可以从解压缩的文件夹中运行。
$ python pyinstaller.py script.py
答案 1 :(得分:0)
在我的Mac pip上安装了/Users/%Username%/Library/Python/2.7/bin
中的二进制文件。如果你将它添加到你的PATH它应该工作。