godoom
godoom

Reputation: 1

ModuleNotFoundError: No module named 'autoit' in python selenium

I downloaded 'autoit' by pip install and confirmed that it exists in the pip list.

autoit          0.1
beautifulsoup4  4.9.3
bs4             0.0.1
config          0.5.0.post0
numpy           1.19.4
pandas          1.1.5
pip             20.3.3
python-dateutil 2.8.1
pytz            2020.4
selenium        3.141.0
setuptools      47.1.0
six             1.15.0
soupsieve       2.1
urllib3         1.26.2

But every time I run this code,

import os
from selenium import webdriver
from selenium.webdriver.common.action_chains import ActionChains
from selenium.webdriver.chrome.options import Options
import autoit
import time
from selenium.webdriver.common.keys import Keys

mobile_emulation = {
    "deviceMetrics": { "width": 360, "height": 640, "pixelRatio": 3.0 },
    "userAgent": "Mozilla/5.0 (Linux; Android 4.2.1; en-us; Nexus 5 Build/JOP40D) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.166 Mobile Safari/535.19" }
chrome_options = Options()
chrome_options.add_experimental_option("mobileEmulation", mobile_emulation)

driver = webdriver.Chrome(chrome_options = chrome_options)


driver.get('https://www.instagram.com/accounts/login/')

I got this error.

,in line 5, in <module>
import autoit
ModuleNotFoundError: No module named 'autoit'

I already upgraded python. i will really appreciate it if you can teach me how to figure out.

Upvotes: 0

Views: 3694

Answers (1)

Nic Laforge
Nic Laforge

Reputation: 1876

From the doc

You need to import this module: import ait

Upvotes: 2

Related Questions