2017-06-29 40 views
0

我試過安裝輪子, 但是用pip在python中安裝一些模塊,每次遇到這些錯誤。可能是什麼問題以及如何解決它?如何解決Python中由於Pip引起的錯誤?

Microsoft Windows [Version 6.3.9600] (c)2013 Microsoft Corporation。版權所有。

C:\Users\user>cd.. 

C:\Users>cd.. 

C:\>cd "Program Files" 

C:\Program Files>cd Python36 

C:\Program Files\Python36>cd Scripts 

C:\Program Files\Python36\Scripts>pip install wheel 
Collecting wheel 
    Using cached wheel-0.29.0-py2.py3-none-any.whl 
Installing collected packages: wheel 
Exception: 
Traceback (most recent call last): 
    File "c:\program files\python36\lib\site-packages\pip\basecommand.py", line 21 
5, in main 
    status = self.run(options, args) 
    File "c:\program files\python36\lib\site-packages\pip\commands\install.py", li 
ne 342, in run 
    prefix=options.prefix_path, 
    File "c:\program files\python36\lib\site-packages\pip\req\req_set.py", line 78 
4, in install 
    **kwargs 
    File "c:\program files\python36\lib\site-packages\pip\req\req_install.py", lin 
e 851, in install 
    self.move_wheel_files(self.source_dir, root=root, prefix=prefix) 
    File "c:\program files\python36\lib\site-packages\pip\req\req_install.py", lin 
e 1064, in move_wheel_files 
    isolated=self.isolated, 
    File "c:\program files\python36\lib\site-packages\pip\wheel.py", line 345, in 
move_wheel_files 
    clobber(source, lib_dir, True) 
    File "c:\program files\python36\lib\site-packages\pip\wheel.py", line 316, in 
clobber 
    ensure_dir(destdir) 
    File "c:\program files\python36\lib\site-packages\pip\utils\__init__.py", line 
83, in ensure_dir 
    os.makedirs(path) 
    File "c:\program files\python36\lib\os.py", line 220, in makedirs 
    mkdir(name, mode) 
PermissionError: [WinError 5] Access is denied: 'c:\\program files\\python36\\Li 
b\\site-packages\\wheel' 

C:\Program Files\Python36\Scripts> 
+1

訪問被拒絕。所以,右鍵點擊終端圖標,然後點擊「以管理員身份運行」,然後執行以上操作。我認爲這應該可以解決你的問題。 –

回答

1

這裏提到你的錯誤,

PermissionError: [WinError 5] Access is denied: 

所以運行命令提示符以管理員身份

在Windows中,可以通過右鍵單擊可執行文件並選擇「以管理員身份運行」來以管理員身份運行。因此,在開始菜單中鍵入"cmd",右鍵單擊cmd.exerun it as administrator

+0

是的,我也認爲這會解決你的問題。以管理員身份運行它。如果沒有,請使用更新的輸出編輯您的問題。 –

相關問題