解決pyautogui.PyAutoGUIException: PyAutoGUI was unable to import pyscreeze.報錯
阿新 • • 發佈:2021-11-25
1.“PyAutoGUI was unable to import pyscreeze. (This is likely because you’re running a version of Python that Pillow (which pyscreeze depends on) doesn’t support currently.) Please install this module to enable the function you tried to call.”
pyautogui.PyAutoGUIException: PyAutoGUI was unable to import pyscreeze. (This is likely because you’re running a version of Python that Pillow (which pyscreeze depends on) doesn’t support currently.) Please install this module to enable the function you tried to call.
解決方案:
pip install pyscreeze
下載依賴包,解決.
2.由於我使用的是idea的python外掛,在第一次建立python專案時沒有選擇自己的python安裝路徑,於是idea自動在F盤給我建立了一個python的執行環境,然而我在命令列使用的python命令和下載的包都在D盤..... 最後通過更改執行環境解決了問題:
File➡project Structure➡SDKs
選擇自己的python目錄下的python.exe
然後重啟重新載入執行環境即可