2016-12-30 44 views
0

我試圖安裝庫Neomodel在我的Django應用程序中使用的Neo4j,但它提出了許多錯誤:安裝Neomodel募集錯誤

Exception: 
Traceback (most recent call last): 
    File "/Library/Python/2.7/site-packages/pip/basecommand.py", line 215, in main 
    status = self.run(options, args) 
    File "/Library/Python/2.7/site-packages/pip/commands/install.py", line 342, in run 
    prefix=options.prefix_path, 
    File "/Library/Python/2.7/site-packages/pip/req/req_set.py", line 778, in install 
    requirement.uninstall(auto_confirm=True) 
    File "/Library/Python/2.7/site-packages/pip/req/req_install.py", line 754, in uninstall 
    paths_to_remove.remove(auto_confirm) 
    File "/Library/Python/2.7/site-packages/pip/req/req_uninstall.py", line 115, in remove 
    renames(path, new_path) 
    File "/Library/Python/2.7/site-packages/pip/utils/__init__.py", line 267, in renames 
    shutil.move(old, new) 
    File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py", line 299, in move 
    copytree(src, real_dst, symlinks=True) 
    File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py", line 208, in copytree 
    raise Error, errors 
Error: [('/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pytz/__init__.py', '/tmp/pip-rVZOK9-uninstall/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pytz/__init__.py', "[Errno 1] Operation not permitted: '/tmp/pip-rVZOK9-uninstall/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pytz/__init__.py'") 

有錯誤消息是很多的時間,但我把它降低到更簡潔。同樣所有的錯誤都是一樣的(Permission Denied)。我嘗試使用下面的命令來安裝它:

sudo pip install neomodel 

我從來沒有見過這樣的錯誤,真不知道該怎麼做來解決。任何幫助將受到歡迎。

回答

2

您應該避免使用sudopip

您可以運行pip install neomodel --user以在沒有virtualenv的情況下運行,但通常使用virtualenv代替是一種很好的做法。