Joey Yi Zhao
Joey Yi Zhao

Reputation: 42490

How to install mtools by pip on Mac OS?

I followed this instruction to install mtools: https://github.com/rueckstiess/mtools/blob/develop/INSTALL.md. I tried both by pip and building from source but failed to launch it. I got below error when trying to launch mlaunch. I see this error relates to python and I am not familiar with python. Does anyone have any idea on this error?

$ mlaunch
Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/2.7/bin/mlaunch", line 9, in <module>
    load_entry_point('mtools==1.2.4.dev0', 'console_scripts', 'mlaunch')()
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources/__init__.py", line 565, in load_entry_point
    return get_distribution(dist).load_entry_point(group, name)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources/__init__.py", line 2697, in load_entry_point
    return ep.load()
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources/__init__.py", line 2370, in load
    return self.resolve()
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources/__init__.py", line 2376, in resolve
    module = __import__(self.module_name, fromlist=['__name__'], level=0)
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/mtools-1.2.4.dev0-py2.7.egg/mtools/mlaunch/mlaunch.py", line 40, in <module>
    raise ImportError("Can't import pymongo. See http://api.mongodb.org/python/current/ for instructions on how to install pymongo.")
ImportError: Can't import pymongo. See http://api.mongodb.org/python/current/ for instructions on how to install pymongo.

Upvotes: 1

Views: 812

Answers (1)

Jens
Jens

Reputation: 21510

The error message in the trace states:

ImportError: Can't import pymongo. See http://api.mongodb.org/python/current/ for instructions on how to install pymongo.

This means that you are missing a dependency called pymongo to run mlaunch.

You can install pymongo by running the following command:

python -m pip install pymongo

For more information on how to install pymongosee the official documentation: https://api.mongodb.com/python/current/installation.html

Upvotes: 1

Related Questions