import error for pyautogui

别等时光非礼了梦想. 提交于 2019-12-19 06:46:38

问题


I installed the pyautogui module and dependencies via pip-3.2 on my raspi correctly, However when I am trying to do

import pyautogui

I am getting an import error:

ImportError: No module named pyautogui

What am I doing wrong? Did the command change? Sorry I am a total python Noob, any help is greatly appreciated :D


回答1:


It might be because you're trying it from a python 2.x shell. Instead try this command on a python3 shell and try importing the same.




回答2:


True you would have to use python 3. First you have to make sure you checked the change system path variable while installing python 3. then open the command prompt on windows and type

pip install pyautogui 

or

pip3 install pyautogui

in osx and linux.




回答3:


Search in C:\Python37-32\Lib\site-packages (Where-ever you have installed it). Check if you have pyautogui directory.

If YES then there exists a configuration issue with pycharm or IDLE.

If NO then

  • Open Command Prompt
  • cd C:\Python37-32\Scripts
  • pip install pillow
  • pip install pyautogui

Check for Successfully installed response.

HAPPY CODING! :)



来源:https://stackoverflow.com/questions/31635140/import-error-for-pyautogui

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!