我试图使用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。
pyinstaller
似乎已正确安装,但命令在PATH
上不可用。您需要找到可执行文件的放置位置。这将取决于您的系统配置(如果您使用的是virtualenv)以及其他系统和使用相关因素。您可以尝试使用
find
来定位可执行文件:这将递归地查找名为
pyinstaller
的文件,从文件系统的根目录开始。如果您知道可执行文件可能放在哪里,可以将搜索范围缩小到该目录。一旦获得可执行文件的绝对路径,就可以直接调用它:
或者如果您没有使用virtualenv或任何东西,可以修改
PATH
以包含可执行文件的父目录:如果你想永久地改变,你需要modify a script somewhere。
相关问题 更多 >
编程相关推荐