Python3 in module named tld

Asked

Viewed 157 times

0

I’m trying to use tld https://pypi.org/project/tld/ and I can’t use it in python3, only in python 2.7, which doesn’t suit me, since my whole project is in python3. The documentation says it is compatible with python3.5 which is what I’m using. What could be the problem?

Traceback (most recent call last):
  File "sufixo.py", line 1, in <module>
    from tld import get_tld
ImportError: No module named 'tld'
  • 1

    It is possible that the first pip in your PATH be the pip of 2.7. If this is the case, then pip install xyz will always install only pro Python 2.7. Try running python3 -m pip install tld and see if it works.

  • That’s right. Thank you very much.

  • Try using the Pip install tld command on the powershell or terminal. Works perfectly with python 3 installed with anaconda.

  • Tries: pip3 install tld

1 answer

0


How is the version of python3 you must use the following command:

$ python3 -m pip install tld

Browser other questions tagged

You are not signed in. Login or sign up in order to post.