2015-02-23 83 views
0

我對mongo沒有任何經驗。當我想在OS X上安裝mongo-connector 1.2.1時,我收到了這些錯誤消息。任何想法是哪裏的問題?安裝mongo-connector 1.2.1

PIP安裝-I蒙戈連接器== 1.2.1

Downloading/unpacking mongo-connector==1.2.1 
    Downloading mongo_connector-1.2.1-py2.py3-none-any.whl (51kB): 51kB downloaded 
Downloading/unpacking elasticsearch (from mongo-connector==1.2.1) 
    Downloading elasticsearch-1.4.0-py2.py3-none-any.whl (56kB): 56kB downloaded 
Downloading/unpacking pysolr>=3.1.0 (from mongo-connector==1.2.1) 
    Downloading pysolr-3.3.0-py2.py3-none-any.whl 
Downloading/unpacking pymongo>=2.4 (from mongo-connector==1.2.1) 
    Downloading pymongo-2.8-cp27-none-macosx_10_9_intel.whl (239kB): 239kB downloaded 
Downloading/unpacking urllib3>=1.8,<2.0 (from elasticsearch->mongo-connector==1.2.1) 
    Downloading urllib3-1.10.1-py2-none-any.whl (76kB): 76kB downloaded 
Downloading/unpacking requests>=2.0 (from pysolr>=3.1.0->mongo-connector==1.2.1) 
    Downloading requests-2.5.1-py2.py3-none-any.whl (464kB): 464kB downloaded 
Installing collected packages: mongo-connector, elasticsearch, pysolr, pymongo, urllib3, requests 
Cleaning up... 
Exception: 
Traceback (most recent call last): 
    File "/Library/Python/2.7/site-packages/pip/basecommand.py", line 122, in main 
    status = self.run(options, args) 
    File "/Library/Python/2.7/site-packages/pip/commands/install.py", line 283, in run 
    requirement_set.install(install_options, global_options, root=options.root_path) 
    File "/Library/Python/2.7/site-packages/pip/req.py", line 1435, in install 
    requirement.install(install_options, global_options, *args, **kwargs) 
    File "/Library/Python/2.7/site-packages/pip/req.py", line 671, in install 
    self.move_wheel_files(self.source_dir, root=root) 
    File "/Library/Python/2.7/site-packages/pip/req.py", line 901, in move_wheel_files 
    pycompile=self.pycompile, 
    File "/Library/Python/2.7/site-packages/pip/wheel.py", line 215, in move_wheel_files 
    clobber(source, lib_dir, True) 
    File "/Library/Python/2.7/site-packages/pip/wheel.py", line 209, in clobber 
    shutil.copy2(srcfile, destfile) 
    File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py", line 130, in copy2 
    copyfile(src, dst) 
    File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py", line 83, in copyfile 
    with open(dst, 'wb') as fdst: 
IOError: [Errno 13] Permission denied: '/Library/Python/2.7/site-packages/mongo_connector/__init__.py' 

Storing debug log for failure in /Users/and/Library/Logs/pip.log 
+1

嘗試安裝在虛擬環境中,否則使用'sudo pip' – itzMEonTV 2015-02-23 14:45:02

+0

sudo幫助,謝謝:) – Matt 2015-02-23 14:48:33

回答

1

這是一個permmision問題,所以 嘗試安裝在虛擬環境中,否則使用sudo pip

sudo pip install -I mongo-connector==1.2.1