转载自:http://www.fkccp.com/archives/2710.html
非常感谢这个大神,我纠结了好久这个问题!
Processing c:\users\rao\downloads\numpy-1.11.2+mkl-cp27-cp27m-win32.whl
Installing collected packages: numpy
Exception:
Traceback (most recent call last):
File “d:\python27\lib\site-packages\pip\basecommand.py”, line 215, in main
status = self.run(options, args)
File “d:\python27\lib\site-packages\pip\commands\install.py”, line 317, in run
prefix=options.prefix_path,
File “d:\python27\lib\site-packages\pip\req\req_set.py”, line 742, in install
**kwargs
File “d:\python27\lib\site-packages\pip\req\req_install.py”, line 831, in install
self.move_wheel_files(self.source_dir, root=root, prefix=prefix)
File “d:\python27\lib\site-packages\pip\req\req_install.py”, line 1032, in move_wheel_files
isolated=self.isolated,
File “d:\python27\lib\site-packages\pip\wheel.py”, line 346, in move_wheel_files
clobber(source, lib_dir, True)
File “d:\python27\lib\site-packages\pip\wheel.py”, line 324, in clobber
shutil.copyfile(srcfile, destfile)
File “d:\python27\lib\shutil.py”, line 83, in copyfile
with open(dst, ‘wb’) as fdst:
IOError: [Errno 13] Permission denied: ‘d:\python27\Lib\site-packages\numpy\core\multiarray.pyd’
最终发现是在安装的同时,有在GUI shell中用import numpy,导致了multiarray.pyd文件的写保护
退出了shell界面,重新再安装numpy-1.11.2+mkl-cp27-cp27m-win32.whl,
问题解决:
D:\Python27\Scripts>pip2.7 install C:\Users\rao\Downloads\numpy-1.11.2+mkl-cp27-cp27m-win32.whl
Processing c:\users\rao\downloads\numpy-1.11.2+mkl-cp27-cp27m-win32.whl
Installing collected packages: numpy
Successfully installed numpy-1.11.2+mkl