1

I'm trying to install the duckduckgo for Python 3.6 (Windows), but cannot figure out how.

I first tried

pip install duckduckgo

Which raises the exception ModuleNotFoundError: No module named urllib2

Then I tried installing by downloading the tar.gz file that is located on their webpage.

I navigated to the correct directory and executed

python setup.py install

Which, apparently, ran successfully.

However, when I execute a Python script with the following code:

import duckduckgo

It raises a ModuleNotFoundError.

Eivind
  • 301
  • 6
  • 18
  • 4
    Unfortunately it seems like this module was never updated to support Python 3. `urllib2` is a Python 2 module and in Python3, it is simply `urllib`. – idjaw Jun 29 '17 at 12:33
  • 2
    Someone apparently wrote a Python 3 version [here](https://pypi.python.org/pypi/DuckDuckGo-Python3-Library/1.0). However, you should probably do some digging around to see if there is anything more official and widely used. – idjaw Jun 29 '17 at 12:35

1 Answers1

4

UPDATE (July 2018). This is version, duckduckpy, supports Python 3. https://github.com/ivankliuk/duckduckpy

pip install duckduckpy

Happy searching!