本人剛安裝完pyinstaller,檢查pip插件里面有安裝上,提示如下:
E:\python>pip list
WARNING: pip is being invoked by an old script wrapper. This will fail in a future version of pip.
Please see https://github.com/pypa/pip/issues/5599 for advice on fixing the underlying issue.
To avoid this problem you can invoke Python with '-m pip' instead of running pip directly.
Package Version
-------------- ---------
altgraph 0.17
future 0.18.2
pefile 2019.4.18
pip 20.0.2
PyInstaller 3.6
pywin32 227
pywin32-ctypes 0.2.0
setuptools 41.2.0
但執行時總是報告如下錯誤,請問如何解決?
E:\python>pyinstaller
'pyinstaller' 不是內部或外部命令,也不是可運行的程式
或批處理檔案。
環境變數里設定了
uj5u.com熱心網友回復:
你在安裝Python的時候也許是選擇了Install for all users(為所有用戶安裝),我看你的環境變數是在Program Files(x86)中的,所以這么想,如果是這樣的話,pyinstaller會安裝在C:\Users\<當前用戶名>\AppData\Roaming\Python38-32\site-packages中,然而這個目錄系統搜不到的,要么你把這個目錄加到環境變數,要么重裝Python,不要選擇Install for all users,然后重新安裝即可解決,有什么問題回復我。uj5u.com熱心網友回復:
path 變數是這樣的,供參考C:\Users\Administrator\AppData\Local\Programs\Python\Python38\Scripts;C:\Users\Administrator\AppData\Local\Programs\Python\Python38;
uj5u.com熱心網友回復:
重啟了嗎,改了path要重啟生效的。轉載請註明出處,本文鏈接:https://www.uj5u.com/qita/54184.html
