2016-12-24 160 views
0

我使用的是Windows 10 64位,并且我使用python安装程序安装了pip以及python。当我键入命令pip install xlrd出现以下错误:使用pip for python安装XLRD时出错(3.6)

C:\Users\Tanmay>pip install xlrd 
Collecting xlrd 
    Downloading xlrd-1.0.0-py3-none-any.whl (143kB) 
    100% |████████████████████████████████| 153kB 317kB/s 
Installing collected packages: xlrd 
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\install.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)\\python36-32\\Lib\\site-packages\\xlrd' 

回答

1

只需通过以管理员身份运行命令提示符即可解决问题。

0

它给你权限错误尝试在Windows的情况下进行安装 作为超级用户sudo pip install xlrd

,在cmd中尝试PIP运行安装使用python可执行文件

eg

`python -m pip install xlrd` 
+0

这是windows –