How to properly import a library (?) in Python
Question: I've been trying to use the tldextract library available here.

After many attempts, I was able to get it installed. However, now when it
comes to run the main file, the compiler says that it can't find any reference
to my library. Below the code I used and that raise the exception.

    
    
    import tldextract
    

I appreciate this is a very basilar question and it is not totally connected
with the library I'm trying to use, but I wonder if you can point me in the
direction on how to "link" or make sure the compiler know that I have that
library.

As far as I can understand as long a library is avaialble in the site-packages
folder, this should sort the problem.

In my circumstance the file is at

/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-
packages/tldextract

So in theory this should be ok, but I get the following error when I try to
use it.

    
    
      Traceback (most recent call last):
      File "test.py", line 12, in <module>
      import tldexport
    ImportError: No module named tldexport
    

I hope this question doesn't make you upset for it's simplicity. I'm here to
learn after all.

Thanks


Answer: Based on the error code, file test.py is calling a module named 'tldexport'

If that's a dependency, install it.

If it's a typo intended to be **tldextract** , then change it :)

