pip install --upgrade pip
doesn't work because the windows FS is brain damaged and won't let you delete an open file.
I've tried setting my environment to the virtualenv that I want to update and then running from a different pip, but that fails with:
(jm) E:pythonjm>c:Python26Scriptspip install --upgrade pip
Downloading/unpacking pip
Running setup.py egg_info for package pip
warning: no previously-included files matching '*.txt' found under directory 'docs\_build'
no previously-included directories found matching 'docs\_build\_sources'
Installing collected packages: pip
Found existing installation: pip 0.7.1
Uninstalling pip:
Successfully uninstalled pip
Running setup.py install for pip
warning: no previously-included files matching '*.txt' found under directory 'docs\_build'
no previously-included directories found matching 'docs\_build\_sources'
Installing pip-script.py script to c:Python26Scripts
Installing pip.exe script to c:Python26Scripts
Installing pip.exe.manifest script to c:Python26Scripts
Installing pip-2.6-script.py script to c:Python26Scripts
Installing pip-2.6.exe script to c:Python26Scripts
Installing pip-2.6.exe.manifest script to c:Python26Scripts
Exception:
Traceback (most recent call last):
File "c:Python26libsite-packagespip-0.7.1-py2.6.eggpipasecommand.py", line 120, in main
File "c:Python26libsite-packagespip-0.7.1-py2.6.eggpipcommandsinstall.py", line 165, in run
File "c:Python26libsite-packagespip-0.7.1-py2.6.eggpip
eq.py", line 1251, in install
File "c:Python26libsite-packagespip-0.7.1-py2.6.eggpip
eq.py", line 466, in commit_uninstall
File "c:Python26libsite-packagespip-0.7.1-py2.6.eggpip
eq.py", line 1549, in commit
File "c:Python26libshutil.py", line 216, in rmtree
rmtree(fullname, ignore_errors, onerror)
File "c:Python26libshutil.py", line 216, in rmtree
rmtree(fullname, ignore_errors, onerror)
File "c:Python26libshutil.py", line 221, in rmtree
onerror(os.remove, fullname, sys.exc_info())
File "c:Python26libshutil.py", line 219, in rmtree
os.remove(fullname)
WindowsError: [Error 5] Access is denied: 'c:\users\mark\appdata\local\temp\pip-gvsove-uninstall\python26\scripts\pip.exe'
Storing complete log in C:UsersmarkAppDataRoamingpippip.log
(jm) E:pythonjm>dir c:UsersmarkAppDataLocalemppip-gvsove-uninstallpython26scripts
Volume in drive C has no label.
Volume Serial Number is 74E4-FE9F
Directory of c:UsersmarkAppDataLocalemppip-gvsove-uninstallpython26scripts
12/07/2010 11:32 AM <DIR> .
12/07/2010 11:32 AM <DIR> ..
05/14/2010 05:54 PM 7,168 pip.exe
1 File(s) 7,168 bytes
2 Dir(s) 22,824,603,648 bytes free
(jm) E:pythonjm>del c:UsersmarkAppDataLocalemppip-gvsove-uninstallpython26scriptspip.exe
I'm hoping someone else has figured out a way around this. Its no problem on linux....
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…