pip install for windows遇到anaconda错误

时间:2017-04-16 02:09:29

标签: python cmd anaconda

我正在尝试为软件定义的无线电RTL-SDR(RTL2832U)安装pyrtlsdr,但我相信我遇到了与anaconda的问题。我在cmd中收到两个错误,虽然我通过cygwin和cmder获得相同的响应。我正在运行以下命令:

pip install pyrtlsdr

但是,当我运行此命令时,我看到以下错误:

pip install pyrtlsdr
Collecting pyrtlsdr
  Using cached pyrtlsdr-0.2.4-py2.py3-none-any.whl
Installing collected packages: pyrtlsdr
Exception:
Traceback (most recent call last):
  File "C:\Program Files\Anaconda2\lib\site-packages\pip\basecommand.py", 
  line 215, in main
status = self.run(options, args)
File "C:\Program Files\Anaconda2\lib\site-packages\pip\commands\install.py", 
line 317, in run
  prefix=options.prefix_path,
File "C:\Program Files\Anaconda2\lib\site-packages\pip\req\req_set.py", line 
742, in install
  **kwargs
File "C:\Program Files\Anaconda2\lib\site-packages\pip\req\req_install.py", 
line 831, in install
  self.move_wheel_files(self.source_dir, root=root, prefix=prefix)
File "C:\Program Files\Anaconda2\lib\site-packages\pip\req\req_install.py", 
line 1032, in move_wheel_files
  isolated=self.isolated,
File "C:\Program Files\Anaconda2\lib\site-packages\pip\wheel.py", line 346, 
in 
move_wheel_files
  clobber(source, lib_dir, True)
File "C:\Program Files\Anaconda2\lib\site-packages\pip\wheel.py", line 317, 
in 
 clobber
 ensure_dir(destdir)
File "C:\Program Files\Anaconda2\lib\site-packages\pip\utils\__init__.py", 
line 83, in ensure_dir
  os.makedirs(path)
File "C:\Program Files\Anaconda2\lib\os.py", line 157, in makedirs
  mkdir(name, mode)
WindowsError: [Error 5] Access is denied: 'C:\\Program 
Files\\Anaconda2\\Lib\\site-packages\\pyrtlsdr-0.2.4.dist-info'
You are using pip version 8.1.2, however version 9.0.1 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' 
command.

这到底出了什么问题?我不知道如何在我认为导致问题的文件中强制权限,另外,我也不知道为什么我在此错误中运行建议的升级时收到相同的错误。

1 个答案:

答案 0 :(得分:1)

尝试以管理员身份运行cmd行,这应该为C驱动器提供写权限。