我尝试使用pip安装pyinstaller (在Ubuntu 16.0.4上):
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.但是,如果我随后尝试调用pyinstaller,则会得到错误pyinstaller: command not found
当pip安装似乎已经成功时,为什么我无法运行pyinstaller。
发布于 2016-08-03 23:56:38
pyinstaller似乎已正确安装,但该命令在PATH上不可用。您需要找到放置可执行文件的位置。这将取决于您的系统配置,如果您使用的是virtualenv,以及其他系统和使用相关因素。
您可以尝试使用find来定位可执行文件:
sudo find / -name pyinstaller这将递归地查找名为pyinstaller的文件,从文件系统的根目录开始。如果您知道可执行文件可能放在哪里,可以将搜索范围缩小到该目录。
有了可执行文件的绝对路径后,您可以直接调用它:
/my/path/to/pyinstaller或者,如果您没有使用virtualenv或其他任何东西,则可以修改PATH以包含可执行文件的父目录:
$PATH = $PATH:/my/path/to如果您想要永久更改,则需要使用modify a script somewhere。
https://stackoverflow.com/questions/38746462
复制相似问题