简体   繁体   English

为什么我安装 pyautogui 后它不会导入并说 No module named 'pyautogui'

[英]How come after I install pyautogui it won't import and says No module named 'pyautogui'

After I install pyautogui through pip using py -m pip install pyautogui .在我使用py -m pip install pyautogui pyautogui 通过 pip 安装 pyautogui 之后。 I try to import it into Pycharm using import pyautogui but it just says "No module named pyautogui".我尝试使用import pyautogui将其导入 Pycharm,但它只是说“没有名为 pyautogui 的模块”。 I have tried uninstalling python and pyautogui and reinstalling them.我试过卸载 python 和 pyautogui 并重新安装它们。 I am very new to python so sorry if this makes no sense or is really easy to fix, thanks:)我是 python 的新手,如果这没有意义或者真的很容易修复,我很抱歉,谢谢:)

Check this answer i believe it is what u need检查这个答案我相信这是你需要的

It's some other guy asking same thing how to install packaging这是其他人问同样的事情如何安装包装

If you already have another Python installed try view the version of your Python如果您已经安装了另一个 Python,请尝试查看您的 Python 版本

python -V

ex.: Python 3.90例如:Python 3.90

try:尝试:

pip3.9 install pyautogui

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM