我目前正在使用mongodb 2.2和pymongo 2.3版运行Ubuntu 12.04.我试图使用Twitters API收集一些信息,我在尝试导入mymongo时收到错误.这是我有的:
import pycurl, json
import pymongo
STREAM_URL = "https://stream.twitter.com/1/statuses/filter.json"
WORDS = "track=#obama"
USER = "myuser"
PASS = "mypass"
Run Code Online (Sandbox Code Playgroud)
ImportError:没有名为pymongo的模块有什么想法吗?
我成功安装了pymongo使用 pip3
Aleeshas-MacBook-Air:project 2 aleesha$ sudo pip3 install pymongo
The directory '/Users/aleesha/Library/Caches/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
The directory '/Users/aleesha/Library/Caches/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip …Run Code Online (Sandbox Code Playgroud)