我正在尝试让GoogleScraper Python 脚本在 Ubuntu 14.04 LTS 上运行,但是当我输入“./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>
我该怎么做才能安装这个 aiohttp 包? 我用谷歌搜索了一下,有点困惑。
这是我的“Python -V”输出
roger@vbox-ubuntu:~/env/bin$ python -V
Python 2.7.6
roger@vbox-ubuntu:~/env/bin$ python3 -V
Python 3.4.0
我之前还运行了以下内容:
virtualenv --python python3 env
source env/bin/activate
pip install GoogleScraper
sudo apt-get install python3-pip
sudo pip3 install aiohttp