我试图让谷歌搜索API在这里工作(我使用这个https://github.com/anthonyhseb/googlesearch因为某些原因我conda install Google-Search-API
- 其他API显然更广泛使用 - 它没有找到它。)
所以,我使用以下代码:
from googlesearch.googlesearch import GoogleSearch
response = GoogleSearch().search("something")
print(response)
我得到了:
ImportError: No module named 'urllib2'
当我尝试通过终端安装urllib2时,我得到:
Could not find a version that satisfies the requirement urllib2 (from versions: )
No matching distribution found for urllib2
我使用的是Python 2.7.13和Anaconda自定义(x86_64)。