2017-02-19 273 views
0

我想用pip install praw命令安裝praw,但在我想安裝pip之前,無法完成此操作。嘗試安裝pip時出現異常

Collecting pip Using cached pip-9.0.1-py2.py3-none-any.whl Collecting wheel Using cached wheel-0.29.0-py2.py3-none-any.whl Installing collected packages: pip, wheel Exception: Traceback (most recent call last): File "/var/folders/vv/v2drs0vd7jz6wlywr02cr3480000gn/T/tmpDdYH0a/pip.zip/pip/basecommand.py", line 215, in main status = self.run(options, args) File "/var/folders/vv/v2drs0vd7jz6wlywr02cr3480000gn/T/tmpDdYH0a/pip.zip/pip/commands/install.py", line 342, in run prefix=options.prefix_path, File "/var/folders/vv/v2drs0vd7jz6wlywr02cr3480000gn/T/tmpDdYH0a/pip.zip/pip/req/req_set.py", line 784, in install **kwargs File "/var/folders/vv/v2drs0vd7jz6wlywr02cr3480000gn/T/tmpDdYH0a/pip.zip/pip/req/req_install.py", line 851, in install self.move_wheel_files(self.source_dir, root=root, prefix=prefix) File "/var/folders/vv/v2drs0vd7jz6wlywr02cr3480000gn/T/tmpDdYH0a/pip.zip/pip/req/req_install.py", line 1064, in move_wheel_files isolated=self.isolated, File "/var/folders/vv/v2drs0vd7jz6wlywr02cr3480000gn/T/tmpDdYH0a/pip.zip/pip/wheel.py", line 345, in move_wheel_files clobber(source, lib_dir, True) File "/var/folders/vv/v2drs0vd7jz6wlywr02cr3480000gn/T/tmpDdYH0a/pip.zip/pip/wheel.py", line 316, in clobber ensure_dir(destdir) File "/var/folders/vv/v2drs0vd7jz6wlywr02cr3480000gn/T/tmpDdYH0a/pip.zip/pip/utils/init.py", line 83, in ensure_dir os.makedirs(path) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/os.py", line 157, in makedirs mkdir(name, mode) OSError: [Errno 13] Permission denied: '/Library/Python/2.7/site-packages/pip'

+0

看看錯誤消息的最後一行,它說的很清楚是什麼問題。 – fNek

+0

試試這個答案http://stackoverflow.com/questions/21214817/installing-praw它爲我工作。 – Nasr

+0

@ Egek92如果你找到你的答案,那麼你需要接受它。其他它將被低估或更晚的答案。 – 2017-02-19 11:31:01

回答

1

似乎你沒有權限到Python文件夾。

嘗試

sudo chown -R $USER /Library/Python/2.7/site-packages/pip 
+0

'sudo chown -R $ USER/Library/Python/2.7/site-packages /'工作。乾杯 –

0

它說它不能寫入'/Library/Python/2.7/site-packages/pip'。適應該文件夾的讀寫權限或嘗試sudo pip install praw

0

嘗試使用的virtualenv或--user選項PIP命令

`pip install praw --user` 
相關問題