我可以知道为什么我不能在 MacOS 上运行 pymongo 吗?我安装了pymongo
sudo easy_install pymongo
但我不确定为什么会收到此错误
conn = Connection(ip)
File "/Library/Python/2.7/site-packages/pymongo-2.4.2-py2.7-macosx-10.8-intel.egg/pymongo/connection.py", line 180, in __init__
File "/Library/Python/2.7/site-packages/pymongo-2.4.2-py2.7-macosx-10.8-intel.egg/pymongo/mongo_client.py", line 269, in __init__
pymongo.errors.ConnectionFailure: could not connect to 192.168.0.1:27017: [Errno 51] Network is unreachable
因此我谷歌并发现我还没有启动pymongo,然后我尝试运行
mongod
mongo
./mongod
然后它返回给我找不到命令。试图执行这个
sudo export PATH=$PATH:/usr/local/mongodb/bin
任何人都知道我的安装发生了什么,我该如何解决?谢谢。