0
我可以知道爲什麼我無法在MacOS上運行pymongo嗎?我安裝了pymongo與Pymongo在MacOS上的安裝和執行
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
任何人都知道我的安裝發生了什麼,我怎麼能解決它?謝謝。