0

I am using PyDev in Eclipse Mars to build my project. I used '''import mysql.connector''' but I get an exception through it:

 "C:\Program Files\Python36\lib\site-packages\mysql\connector\__init__.py", line 41, in <module>
    import dns.resolver
ModuleNotFoundError: No module named 'dns'

There is no option of using pip in Preference>Pydev>Python Interpreters, so I tried adding dns & dnspython module library globally(which I was able to), yet I am getting the same exception.

Jona
  • 1,218
  • 1
  • 10
  • 20
  • Welcome to Stack Overflow! Would you mind editing your question and providing some details about how you installed dnspython globally? – kimbo Mar 01 '20 at 21:23
  • Also, this answer to a similar question might help you out - https://stackoverflow.com/a/6076903/9638991 – kimbo Mar 01 '20 at 21:24

1 Answers1

0

@Mayuresh Vadhyar there's actually a Manage with pip button in Preferences > PyDev > Interpreters > Python Interpreter that you could use to do pip install <library>.

Or you could also use pip from the command line (PyDev should pick it up automatically after you install it).

As for having the error, this means something didn't go well when you installed the module globally... can you give more details on which steps did you do when you did that? -- I'm not sure what installing a module globally means here...

Fabio Zadrozny
  • 24,814
  • 4
  • 66
  • 78