Quantcast
Viewing all articles
Browse latest Browse all 46

No module named 'whois' Despite Already Installing 'python-whois'

Context


I am making a project using Python and have a virtual environment installed called venv. Here is the information for the virtual environment:

Version and Modules Installed:

Image may be NSFW.
Clik here to view.
enter image description here

I am on a linux machine that has a package installed called whois via apt.

I am using VSC and its built-in terminal.

Here is the code that I run using the terminal with the virtual environment activated.

Image may be NSFW.
Clik here to view.
enter image description here

The Problem


The following error occurs when the code tries to import the module.

┌──(venv)─(narwhal㉿WhoAreWe)-[~/Documents/Projects/PassCon]└─$ python ./WHOIS/custom_whois.py Traceback (most recent call last):  File "/home/narwhal/Documents/Projects/PassCon/./WHOIS/custom_whois.py", line 1, in <module>    import whoisModuleNotFoundError: No module named 'whois'

What Have I Tried


I have tried to not use the virtual environment and run it normally and it does work but from what I understand it is using the whois package installed via apt (I found out that it doesn't work as I am using whois() instead of query() which is used by the APT-installed whois).

I also have uninstalled and re-installed python-whois multiple times.

FYI

I do not wish to uninstall the apt version of whois as I need it for my day to day. I doubt that its the problem, but I hope its not the only solution to fix my problem.

I also want to use python-whois so it is easily installed for users.


Viewing all articles
Browse latest Browse all 46

Trending Articles