0
Python 3.9.0 (tags/v3.9.0:9cf6752, Oct  5 2020, 15:34:40) [MSC v.1927 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license()" for more information.


>>> import pyautogui
Traceback (most recent call last):
  File "C:\Users\ADMIN\AppData\Local\Programs\Python\Python39\lib\site-packages\numpy\__init__.py", line 305, in <module>
    _win_os_check()
  File "C:\Users\ADMIN\AppData\Local\Programs\Python\Python39\lib\site-packages\numpy\__init__.py", line 302, in _win_os_check
    raise RuntimeError(msg.format(__file__)) from None
RuntimeError: The current Numpy installation ('C:\\Users\\ADMIN\\AppData\\Local\\Programs\\Python\\Python39\\lib\\site-packages\\numpy\\__init__.py') fails to pass a sanity check due to a bug in the windows runtime.
>>> 
4

1 回答 1

0

我在 Python 3.9 中使用 Numpy 1.19.4 并且发生了错误。所以将你的numpy安装降级到1.19.3(首先卸载PyAutoGUI然后Numpy然后重新安装Numpy 1.19.3pip install numpy==1.19.3然后PyAutoGUI)

于 2020-11-10T03:34:40.633 回答