(我使用的是 Linux,並且使用 SuperUser,因為 Stackoverflow 告訴我要去這裡!)
我想使用 pyinstaller,所以我遵循了他們的文檔:
pip install pyinstaller
pyinstaller my_script_name.py
pip 安裝 說:
Successfully installed altgraph-0.15 dis3-0.1.2 future-0.16.0 macholib-1.9 pefile-2017.11.5 pyinstaller-3.3.1 setuptools-39.0.1
但是當我運行 pyinstaller 時它說:
pyinstaller: command not found
我用 pip3 嘗試了同樣的結果,同樣的結果。
答案1
找尋pyinstaller在哪裡
find / -name "pyinstaller"
結果看起來像
/usr/local/python3/bin/pyinstaller
複製到
/usr/bin/pyinstaller
(linux自動查找指令的地方)cp /usr/local/python3/bin/pyinstaller /usr/bin/pyinstaller3.cp
然後就可以執行pyinstaller了!
ps:如果不想複製檔案可以直接pyinstaller
執行
/usr/local/python3/bin/pyinstaller
希望能幫助你!
附:
檢查文檔,驗證安裝