[英]Python: Cannot install python module "pyautogui"
我無法在 python 版本 3.8 的 windows 10 上安裝名為“pyautogui”的 python 模塊
CMD:
C:\Users\Миша>pip install pyautogui
Collecting pyautogui
Using cached PyAutoGUI-0.9.50.tar.gz (57 kB)
Collecting pymsgbox
Using cached PyMsgBox-1.0.8.tar.gz (18 kB)
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing wheel metadata ... error
ERROR: Command errored out with exit status 1:
command: 'c:\python38\python.exe' 'c:\python38\lib\site-packages\pip\_vendor\pep517\_in_process.py' prepare_metadata_for_build_wheel 'C:\Users\CA81~1\AppData\Local\Temp\tmphpcf9lnw'
cwd: C:\Users\Миша\AppData\Local\Temp\pip-install-rzx8xe3p\pymsgbox
Complete output (14 lines):
running dist_info
creating C:\Users\Миша\AppData\Local\Temp\pip-modern-metadata-f8srr00j\PyMsgBox.egg-info
writing C:\Users\Миша\AppData\Local\Temp\pip-modern-metadata-f8srr00j\PyMsgBox.egg-info\PKG-INFO
writing dependency_links to C:\Users\Миша\AppData\Local\Temp\pip-modern-metadata-f8srr00j\PyMsgBox.egg-info\dependency_links.txt
writing top-level names to C:\Users\Миша\AppData\Local\Temp\pip-modern-metadata-f8srr00j\PyMsgBox.egg-info\top_level.txt
writing manifest file 'C:\Users\Миша\AppData\Local\Temp\pip-modern-metadata-f8srr00j\PyMsgBox.egg-info\SOURCES.txt'
reading manifest file 'C:\Users\Миша\AppData\Local\Temp\pip-modern-metadata-f8srr00j\PyMsgBox.egg-info\SOURCES.txt'
reading manifest template 'MANIFEST.in'
Error in sitecustomize; set PYTHONVERBOSE for traceback:
SyntaxError: (unicode error) 'utf-8' codec can't decode byte 0xcc in position 0: invalid continuation byte (sitecustomize.py, line 21)
warning: no files found matching '*.py' under directory 'pymsgbox'
writing manifest file 'C:\Users\Миша\AppData\Local\Temp\pip-modern-metadata-f8srr00j\PyMsgBox.egg-info\SOURCES.txt'
creating 'C:\Users\Миша\AppData\Local\Temp\pip-modern-metadata-f8srr00j\PyMsgBox.dist-info'
error: invalid command 'bdist_wheel'
----------------------------------------
ERROR: Command errored out with exit status 1: 'c:\python38\python.exe' 'c:\python38\lib\site-packages\pip\_vendor\pep517\_in_process.py' prepare_metadata_for_build_wheel 'C:\Users\CA81~1\AppData\Local\Temp\tmphpcf9lnw' Check the logs for full command output.
我還沒有嘗試做某事,因為我不明白這個錯誤。 有任何想法嗎?
我找到了解決方案:
將 pip 回滾到舊版本:
python -m pip install pip==18.1
安裝所需的模塊:
pip install pyautogui
更新 pip:
python -m pip install --upgrade pip
PS這個解決方案也適用於其他模塊。
從官方文檔中,提到使用“pip install PyAutoGUI”(遵循正確的大小寫)。 我使用相同的並且正在為我工作。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.