I am currently trying to install MongoDB driver for Python on my Mac OS X (mavericks).
But when I run
[ Dsl ~/Documents/python ] sudo easy_install pymongo
I get the following output
Searching for pymongo
Best match: pymongo 2.7
Processing pymongo-2.7-py2.7-macosx-10.9-intel.egg
Removing pymongo 2.7rc1 from easy-install.pth file
Adding pymongo 2.7 to easy-install.pth file
Using /Library/Python/2.7/site-packages/pymongo-2.7-py2.7-macosx-10.9-intel.egg
Processing dependencies for pymongo
Finished processing dependencies for pymongo
I try a lot of different commands, but nothing work. How to install pymongo ?
Thanks for your help
Edit: When I try to use it in a python script
#!/usr/bin/env python3
import pymongo
client = MongoClient()
I have this error
Traceback (most recent call last):
File "./mongo.py", line 2, in <module>
import pymongo
ImportError: No module named 'pymongo'
Try these commands. Source
$ easy_install -U setuptools
$ python -m easy_install pymongo
I have same error , and I can fix it following command.
sudo pip3 install pymongo
sudo apt-get install python3-pip
Try this. but this command for Ubuntu 14.04 OX.not sure is this work in Max OS X.
python3 -m pip install pymongo
worked for me in OS X
Installing pymongo goes very simple
Make sure that python is installed already in your machine.If not check here for quick installation.
CentOS:
Update using yum
yum -y update
Download the pip using curl:
curl "https://bootstrap.pypa.io/get-pip.py" -o "get-pip.py"
Install pip command using python
python get-pip.py
Install pymongo using pip
pip install pymongo
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With