2014-09-07 4 views
9

I 3.4.1 Python auf Windows 7 installiert haben, Pip enthalten und während der Installation ausgewählt haben python.exe zu PATH hinzufügen.Anfragen Ausnahme installieren PIP- und pip installieren beautifulsoup4 Ausnahme

Beim Laufen pip Anfragen installieren erhalte ich:

C:\Python34>pip install requests 
Requirement already satisfied (use --upgrade to upgrade): requests in c:\python3 
4\lib\site-packages 
Cleaning up... 
    Exception: 
Traceback (most recent call last): 
    File "C:\Python34\lib\shutil.py", line 370, in _rmtree_unsafe 
    os.unlink(fullname) 
PermissionError: [WinError 5] Access is denied: 'C:\\Users\\User\\AppData\\Local 
\\Temp\\pip_build_User\\pip\\pip\\_vendor\\distlib\\w32.exe' 

During handling of the above exception, another exception occurred: 

Traceback (most recent call last): 
    File "C:\Python34\lib\site-packages\pip\basecommand.py", line 122, in main 
    status = self.run(options, args) 
    File "C:\Python34\lib\site-packages\pip\commands\install.py", line 302, in run 

    requirement_set.cleanup_files(bundle=self.bundle) 
    File "C:\Python34\lib\site-packages\pip\req.py", line 1333, in cleanup_files 
    rmtree(dir) 
    File "C:\Python34\lib\site-packages\pip\util.py", line 43, in rmtree 
    onerror=rmtree_errorhandler) 
    File "C:\Python34\lib\shutil.py", line 477, in rmtree 
    return _rmtree_unsafe(path, onerror) 
    File "C:\Python34\lib\shutil.py", line 367, in _rmtree_unsafe 
    _rmtree_unsafe(fullname, onerror) 
    File "C:\Python34\lib\shutil.py", line 367, in _rmtree_unsafe 
    _rmtree_unsafe(fullname, onerror) 
    File "C:\Python34\lib\shutil.py", line 367, in _rmtree_unsafe 
    _rmtree_unsafe(fullname, onerror) 
    File "C:\Python34\lib\shutil.py", line 367, in _rmtree_unsafe 
    _rmtree_unsafe(fullname, onerror) 
    File "C:\Python34\lib\shutil.py", line 372, in _rmtree_unsafe 
    onerror(os.unlink, fullname, sys.exc_info()) 
    File "C:\Python34\lib\site-packages\pip\util.py", line 53, in rmtree_errorhand 
ler 
    (exctype is PermissionError and value.args[3] == 5) #python3.3 
IndexError: tuple index out of range 

    Storing debug log for failure in C:\Users\User\pip\pip.log 

Wenn beautifulsoup4 pip installieren läuft ich:

C:\Python34>pip install beautifulsoup4 
Downloading/unpacking beautifulsoup4 
    Running setup.py (path:C:\Users\User\AppData\Local\Temp\pip_build_User\beautif 
ulsoup4\setup.py) egg_info for package beautifulsoup4 

Installing collected packages: beautifulsoup4 
    Running setup.py install for beautifulsoup4 
    Skipping implicit fixer: buffer 
    Skipping implicit fixer: idioms 
    Skipping implicit fixer: set_literal 
    Skipping implicit fixer: ws_comma 

Successfully installed beautifulsoup4 
Cleaning up... 
    Exception: 
Traceback (most recent call last): 
    File "C:\Python34\lib\shutil.py", line 370, in _rmtree_unsafe 
    os.unlink(fullname) 
PermissionError: [WinError 5] Access is denied: 'C:\\Users\\User\\AppData\\Local 
\\Temp\\pip_build_User\\pip\\pip\\_vendor\\distlib\\w32.exe' 

During handling of the above exception, another exception occurred: 

Traceback (most recent call last): 
    File "C:\Python34\lib\site-packages\pip\basecommand.py", line 122, in main 
    status = self.run(options, args) 
    File "C:\Python34\lib\site-packages\pip\commands\install.py", line 302, in run 

    requirement_set.cleanup_files(bundle=self.bundle) 
    File "C:\Python34\lib\site-packages\pip\req.py", line 1333, in cleanup_files 
    rmtree(dir) 
    File "C:\Python34\lib\site-packages\pip\util.py", line 43, in rmtree 
    onerror=rmtree_errorhandler) 
    File "C:\Python34\lib\shutil.py", line 477, in rmtree 
    return _rmtree_unsafe(path, onerror) 
    File "C:\Python34\lib\shutil.py", line 367, in _rmtree_unsafe 
    _rmtree_unsafe(fullname, onerror) 
    File "C:\Python34\lib\shutil.py", line 367, in _rmtree_unsafe 
    _rmtree_unsafe(fullname, onerror) 
    File "C:\Python34\lib\shutil.py", line 367, in _rmtree_unsafe 
    _rmtree_unsafe(fullname, onerror) 
    File "C:\Python34\lib\shutil.py", line 367, in _rmtree_unsafe 
    _rmtree_unsafe(fullname, onerror) 
    File "C:\Python34\lib\shutil.py", line 372, in _rmtree_unsafe 
    onerror(os.unlink, fullname, sys.exc_info()) 
    File "C:\Python34\lib\site-packages\pip\util.py", line 53, in rmtree_errorhand 
ler 
    (exctype is PermissionError and value.args[3] == 5) #python3.3 
IndexError: tuple index out of range 

    Storing debug log for failure in C:\Users\User\pip\pip.log 

C:\Python34> 

Ich frage mich, was bedeuten diese Ausnahmen?

Haben die Pakete wirklich erfolgreich wie im Protokoll angegeben installiert und werden sie gut laufen oder bin ich etwas falsch zu machen.

Warum die Ausnahmen und wie kann ich sie loswerden?

+0

Installation beautifulsoup ist ein PITA, was auch immer die Version ist ... Aber in diesem speziellen Zusammenhang, dass nicht das Problem sein. Wird die Konsole mit Administratorrechten ausgeführt? – BartoszKP

+0

@BartoszKPc Ich persönlich habe keine Probleme, bs4 mit pip unter Windows zu installieren. – tyteen4a03

+0

Ja, nicht das Cmd als Administrator war das Problem. Vielen Dank. – lowtechsun

Antwort

8

Alle Berechtigungsausnahmen bedeuten, dass Ihre Eingabeaufforderung keine Administratorrechte besitzt.

Führen Sie die Eingabeaufforderung als Administrator (für cmd im Startmenü suchen, klicken Sie rechts, als Administrator ausführen). Wenn das nicht funktioniert, versuchen Sie es erneut mit pip; Die Dateiberechtigungen könnten irgendwie vermasselt sein.

+2

Lief den Cmd als Admin und keine Ausnahmen in beiden Fällen. Vielen Dank. – lowtechsun

+2

Vielen Dank für diese Lösung ... War aufgrund von Berechtigungsproblemen hoch gesteckt. +1 dafür .. – Zax