升级numpy失败并显示“权限被拒绝”错误

时间:2016-04-01 11:22:08

标签: python numpy

我从http://www.lfd.uci.edu/~gohlke/pythonlibs/#numpy下载了预编译的numpy二进制文件,并尝试使用

升级Windows 7上的当前numpy二进制文件
pip install --upgrade "numpy-1.10.4 vanilla-cp27-none-win32.whl"

我收到以下错误:

C:\Users\Jeroen\AppData\Local\Enthought\Canopy\User\Scripts\pip-script.py run on 04/01/16 13:20:05
Unpacking c:\users\jeroen\downloads\numpy-1.10.4 vanilla-cp27-none-win_amd64.whl
Installing collected packages: numpy
Cleaning up...
Exception:
Traceback (most recent call last):
  File "C:\Users\Jeroen\AppData\Local\Enthought\Canopy\User\lib\site-packages\pip\basecommand.py", line 122, in main
    status = self.run(options, args)
  File "C:\Users\Jeroen\AppData\Local\Enthought\Canopy\User\lib\site-packages\pip\commands\install.py", line 283, in run
    requirement_set.install(install_options, global_options, root=options.root_path)
  File "C:\Users\Jeroen\AppData\Local\Enthought\Canopy\User\lib\site-packages\pip\req.py", line 1435, in install
    requirement.install(install_options, global_options, *args, **kwargs)
  File "C:\Users\Jeroen\AppData\Local\Enthought\Canopy\User\lib\site-packages\pip\req.py", line 671, in install
    self.move_wheel_files(self.source_dir, root=root)
  File "C:\Users\Jeroen\AppData\Local\Enthought\Canopy\User\lib\site-packages\pip\req.py", line 901, in move_wheel_files
    pycompile=self.pycompile,
  File "C:\Users\Jeroen\AppData\Local\Enthought\Canopy\User\lib\site-packages\pip\wheel.py", line 215, in move_wheel_files
    clobber(source, lib_dir, True)
  File "C:\Users\Jeroen\AppData\Local\Enthought\Canopy\User\lib\site-packages\pip\wheel.py", line 209, in clobber
    shutil.copy2(srcfile, destfile)
  File "C:\Users\Jeroen\AppData\Local\Enthought\Canopy\App\appdata\canopy-1.6.2.3262.win-x86_64\lib\shutil.py", line 130, in copy2
    copyfile(src, dst)
  File "C:\Users\Jeroen\AppData\Local\Enthought\Canopy\App\appdata\canopy-1.6.2.3262.win-x86_64\lib\shutil.py", line 83, in copyfile
    with open(dst, 'wb') as fdst:
IOError: [Errno 13] Permission denied: 'C:\\Users\\Jeroen\\AppData\\Local\\Enthought\\Canopy\\User\\Lib\\site-packages\\numpy\\core\\multiarray.pyd'

有关我系统上当前安装的numpy版本的更多信息:

Python 2.7.3 |EPD_free 7.3-2 (32-bit)| (default, Apr 12 2012, 14:30:37) [MSC v.1500 32 bit (Intel)] on win32
Type "credits", "demo" or "enthought" for more information.
>>> import numpy
>>> print numpy.__version__
1.7.1
>>> print numpy.__path__
['C:\\Python27\\lib\\site-packages\\numpy']

5 个答案:

答案 0 :(得分:20)

我有同样的信息,对我来说,只需要在更新或重新安装numpy之前关闭eclipse。不知道为什么,但这可能会帮助有类似问题的人首先确保一切都关闭。

答案 1 :(得分:4)

  1. 在任务管理器中关闭“Python”进程
  2. 删除文件名“numpy \ core \ multiarray.pyd”(如果有的话)
  3. 打开CTRL + SHIFT cmd
  4. 现在尝试安装包。它将成功安装。

答案 2 :(得分:0)

我卸载了Enthought的CanopyEDP,然后我就可以通过numpy升级pip

答案 3 :(得分:0)

关闭IDLE窗口,它适用于我

答案 4 :(得分:0)

有同样的问题。通过以管理员身份访问命令模块来解决此问题。这样做:

  1. 点击开始
  2. 点击所有程序
  3. 点击附件
  4. 右键单击命令提示符
  5. 以管理员身份运行
  6. 如果出现“用户帐户控制对话框”,请单击“这是您想要的”