2

I tried installing pyautogui in Visual Studio but whenever I run the following program:

import subprocess
import pyautogui #pylint: disable=E0401
import time
import pandas as pd #pylint: disable=E0401
from datetime import datetime

def sign_in(meetingid, pswd):
    # Opens up zoom app
    subprocess.call(r"C:\Users\krish\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Zoom")

sign_in('6931145146', 'SKS123')

I get the following error:

File "c:\Users\krish\Desktop\AUTOBOT\Zoom Auto Attender", line 2, in <module>
    import pyautogui #pylint: disable=E0401
ModuleNotFoundError: No module named 'pyautogui'

I tried the available solution import error for pyautogui

But it doesn't work, So please help.

krish-del
  • 23
  • 1
  • 5
  • How do you know that you installed `pyautogui` to the site-packages directory of the interpreter you use to run your program? – Michael Ruth Apr 16 '21 at 05:20

4 Answers4

3

You probably need to install the package for pyautogui

https://pyautogui.readthedocs.io/en/latest/

pip install pyautogui

eriblexp
  • 41
  • 3
2

According to your description, please refer to the following:

  1. Please use the command "python --version" or "pip --version" in the VS Code terminal to check whether the python currently used by the VS Code terminal is consistent with the one displayed in the lower left corner of the VS Code.

    enter image description here

    (If they are inconsistent, please use the shortcut key Ctrl+Shift+` to open a new VS Code terminal, it will automatically enter the selected environment.)

  2. Check the installation of the module. (pip show pyautogui)

    enter image description here

    The location where VS Code recognizes the python module is in "\Lib\site-packages\" of the currently used python environment.

Run:

enter image description here

Reference: Python environments in VS Code.

Jill Cheng
  • 9,179
  • 1
  • 20
  • 25
0

r u sure that u r not in the venv(virtual environment) , if this is not the case manually install the .whl files go to this site https://www.lfd.uci.edu/~gohlke/pythonlibs/ and download the wheel files . and then in the cmd or terminal type pip install 'where u have stored the .whl file that should do the work

MrHola21
  • 301
  • 2
  • 8
0

I found a problem that I have two Python install on my machine. So I remove all of them and reinstall, um and the problem solve.

butter
  • 11
  • This does not really answer the question. If you have a different question, you can ask it by clicking [Ask Question](https://stackoverflow.com/questions/ask). To get notified when this question gets new answers, you can [follow this question](https://meta.stackexchange.com/q/345661). Once you have enough [reputation](https://stackoverflow.com/help/whats-reputation), you can also [add a bounty](https://stackoverflow.com/help/privileges/set-bounties) to draw more attention to this question. - [From Review](/review/late-answers/30711559) – Joël Jan 02 '22 at 20:37