0

I'm trying to use IPwhois module. I installed it using PIP and when i try to import the module and use it in my script, it's giving below error:

"ModuleNotFoundError: No module named 'ipwhois'".

Code:

from ipwhois import IPWhois
from pprint import pprint

obj = IPWhois('74.125.225.229')
results = obj.lookup()
pprint(results)
jordanm
  • 33,009
  • 7
  • 61
  • 76
  • `pip install ipwhois`or `pip3 install ipwhois` – Pedro Lobito Mar 02 '20 at 21:56
  • @PedroLobito. Thanks for replying. I already did both and it shows it satisfies the requirement.Requirement already satisfied: ipwhois in /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages (1.1.0) Requirement already satisfied: dnspython in /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages (from ipwhois) (1.16.0) – KayAarBee Mar 03 '20 at 16:54
  • How do you run your code? Under Python3? Are you using a virtualenv? Etc. You need to provide more details. `pip install` just installed the module somewhere but your code, depending on how you run it, is looking elsewhere. Print `sys.path` from your program to see where it searches for modules. – Patrick Mevzek Mar 08 '20 at 04:16

0 Answers0