PRAW安装错误

时间:2017-02-26 14:48:59

标签: python praw

我正在尝试在Windows上安装PRAW,但是当我在cmd中尝试pip安装PRAW时,我一直收到此错误。我也似乎无法在网上找到任何帮助,但我不是特别懂技术,所以如果这是一个简单的问题我很抱歉

Exception:
Traceback (most recent call last):
  File "c:\program files (x86)\python36-32\lib\site-packages\pip\basecommand.py"
, line 215, in main
    status = self.run(options, args)
  File "c:\program files (x86)\python36-32\lib\site-packages\pip\commands\instal
l.py", line 342, in run
    prefix=options.prefix_path,
  File "c:\program files (x86)\python36-32\lib\site-packages\pip\req\req_set.py"
, line 784, in install
    **kwargs
  File "c:\program files (x86)\python36-32\lib\site-packages\pip\req\req_install
.py", line 851, in install
    self.move_wheel_files(self.source_dir, root=root, prefix=prefix)
  File "c:\program files (x86)\python36-32\lib\site-packages\pip\req\req_install
.py", line 1064, in move_wheel_files
    isolated=self.isolated,
  File "c:\program files (x86)\python36-32\lib\site-packages\pip\wheel.py", line
 345, in move_wheel_files
    clobber(source, lib_dir, True)
  File "c:\program files (x86)\python36-32\lib\site-packages\pip\wheel.py", line
 316, in clobber
    ensure_dir(destdir)
  File "c:\program files (x86)\python36-32\lib\site-packages\pip\utils\__init__.
py", line 83, in ensure_dir
    os.makedirs(path)
  File "c:\program files (x86)\python36-32\lib\os.py", line 220, in makedirs
    mkdir(name, mode)
PermissionError: [WinError 5] Access is denied: 'c:\\program files (x86)\\python
36-32\\Lib\\site-packages\\requests'

2 个答案:

答案 0 :(得分:1)

我有两个理论:

  1. cmd.exe没有管理员权限在该特定文件夹中执行mkdir

  2. 安装程序尝试修改的文件夹是只读的

  3. 如果运行具有管理员权限的cmd.exe不起作用,请转到

    `'c:\\program files (x86)\\python36-32\\Lib\\site-packages\\requests'`
    

    并检查它是否为只读。您可能还需要管理员权限才能执行此操作。

答案 1 :(得分:-1)

  1. 单击“开始”按钮
  2. 输入cmd
  3. 点击“以管理员身份运行”
  4. 尝试像以前一样再次安装praw。