Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

526
Views
ModuleNotFoundError: No module named 'dns' in Pycharm

I am a newbie at Python and I am trying to insert some data into MySQL. I keep getting an error that I cannot figure out how to fix. I have attempted to import the dns.resolver but I cant find it. The error is stating:

File "C:\Users\Tob\PycharmProjects\cms\window.py", line 3, in import mysql.connector File "C:\Users\Tob\AppData\Local\Programs\Python\Python38\lib\site-packages\mysql\connector_init_.py", line 41, in import dns.resolver ModuleNotFoundError: No module named 'dns'

Here is my code. Any help would be greatly appreciated :)

import tkinter
import mysql
import mysql.connector

top = tkinter.Tk()

def submit():
db = mysql.connector.connect('localhost', 'root', '_______', 'helpdesk')

cursor = db.cursor()

cursor.execute("INSERT INTO users VALUES (:uLogin, :uPassword, :uFirstName, :uLastName, :uEmail)",
{'uLogin': uLogin.get(), 'uPassword': uPassword.get(), 'uFirstName': uFirstName.get(),               'uLastName': uLastName.get(), 'uEmail': uEmail.get()})

cursor.commit()

cursor.close()

submit = tkinter.Button(top, text="Submit", command=submit)
submit.grid(row=5, column=0, columnspan=2, padx=10, pady=10, ipadx=100)
over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

You should do this in a command line window. (see this question!)

git clone https://github.com/rthalley/dnspython
cd dnspython/
python setup.py install
over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!