Roger
Roger

Reputation: 365

GoogleScraper (Python Script) error: "pkg_resources.DistributionNotFound: aiohttp"

I am trying to get GoogleScraper Python script working on Ubuntu 14.04 LTS, but am getting the following error when I type "./GoogleScraper -h"

<code>
 ./GoogleScraper -h
Traceback (most recent call last):
  File "./GoogleScraper", line 5, in <module>
    from pkg_resources import load_entry_point
  File "/home/roger/env/lib/python3.4/site-packages/pkg_resources.py", line 2716, in <module>
    working_set.require(__requires__)
  File "/home/roger/env/lib/python3.4/site-packages/pkg_resources.py", line 685, in require
    needed = self.resolve(parse_requirements(requirements))
  File "/home/roger/env/lib/python3.4/site-packages/pkg_resources.py", line 588, in resolve
    raise DistributionNotFound(req)
pkg_resources.DistributionNotFound: aiohttp
</code>

What do I do to install this aiohttp package? I googled and was a little confused.

Here is my "Python -V" output

roger@vbox-ubuntu:~/env/bin$ python -V Python 2.7.6 roger@vbox-ubuntu:~/env/bin$ python3 -V Python 3.4.0

I also ran the following prior:

virtualenv --python python3 env source env/bin/activate pip install GoogleScraper sudo apt-get install python3-pip sudo pip3 install aiohttp

Upvotes: 4

Views: 495

Answers (2)

Roger
Roger

Reputation: 365

Looks like much of my problem was running "sudo apt-get install" in my local environment.

My fix was starting with a fresh Ubuntu 14.04 LTS install and then running the following:

sudo apt-get install python-virtualenv python3-pip liblz-dev python-dev libxml2-dev libxslt-dev zlib1g-dev python3-dev libmysqlclient-dev ubuntu-desktop chromium-chromedriver google-chrome-stable

After that, I ran the following commands on the author's website:

virtualenv --python python3 env source env/bin/activate pip install GoogleScraper sudo pip3 install aiohttp

After that, I was able to get "GoogleScraper -h" to output the help file, as expected.

Upvotes: 2

Benoit Lacherez
Benoit Lacherez

Reputation: 514

sudo pip3 install aiohttp

should fix your problem (preceded by sudo apt-get install python3-pip if pip is not installed yet)

Upvotes: 3

Related Questions