在Mac上安装Praw时遇到问题

时间:2017-09-29 23:31:48

标签: python macos pip praw

我在OSX上安装prat时遇到问题 以下是我在MacBook上安装python pip时的说明。我不确定我到底出错的地方: https://www.youtube.com/watch?v=yBdZZGPpYxg

我也看了他的网站,但我找不到我想要的具体解决方案: https://praw.readthedocs.io/en/latest/getting_started/installation.html

我已经安装了自制软件和pip。当我运行pip install praw时会出现以下内容

  My_names-MacBook-Pro:~ MyName$ pip install praw
Collecting praw
  Downloading praw-5.1.0-py2.py3-none-any.whl (88kB)
    100% |████████████████████████████████| 92kB 347kB/s 
Collecting prawcore<0.13,>=0.12.0 (from praw)
  Downloading prawcore-0.12.0-py2.py3-none-any.whl
Collecting update-checker>=0.16 (from praw)
  Downloading update_checker-0.16-py2.py3-none-any.whl
Requirement already satisfied: requests<3.0,>=2.6.0 in /Library/Python/2.7/site-packages (from prawcore<0.13,>=0.12.0->praw)
Requirement already satisfied: idna<2.7,>=2.5 in /Library/Python/2.7/site-packages (from requests<3.0,>=2.6.0->prawcore<0.13,>=0.12.0->praw)
Requirement already satisfied: urllib3<1.23,>=1.21.1 in /Library/Python/2.7/site-packages (from requests<3.0,>=2.6.0->prawcore<0.13,>=0.12.0->praw)
Requirement already satisfied: certifi>=2017.4.17 in /Library/Python/2.7/site-packages (from requests<3.0,>=2.6.0->prawcore<0.13,>=0.12.0->praw)
Requirement already satisfied: chardet<3.1.0,>=3.0.2 in /Library/Python/2.7/site-packages (from requests<3.0,>=2.6.0->prawcore<0.13,>=0.12.0->praw)
Installing collected packages: prawcore, update-checker, praw
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 784, in install
    **kwargs
  File "/Library/Python/2.7/site-packages/pip/req/req_install.py", line 851, in install
    self.move_wheel_files(self.source_dir, root=root, prefix=prefix)
  File "/Library/Python/2.7/site-packages/pip/req/req_install.py", line 1064, in move_wheel_files
    isolated=self.isolated,
  File "/Library/Python/2.7/site-packages/pip/wheel.py", line 345, in move_wheel_files
    clobber(source, lib_dir, True)
  File "/Library/Python/2.7/site-packages/pip/wheel.py", line 316, in clobber
    ensure_dir(destdir)
  File "/Library/Python/2.7/site-packages/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/prawcore'

0 个答案:

没有答案