Windows 상자에서 Python PIP를 업데이트하는 방법에 대한 아이디어가 있습니까?
pip install --upgrade pip
Windows FS가 뇌 손상되어 열려있는 파일을 삭제할 수 없기 때문에 작동하지 않습니다.
내 환경을 업데이트하려는 virtualenv로 설정 한 다음 다른 pip에서 실행하려고 시도했지만 다음과 같이 실패합니다.
(jm) E:\python\jm>c:\Python26\Scripts\pip 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:\Python26\Scripts
Installing pip.exe script to c:\Python26\Scripts
Installing pip.exe.manifest script to c:\Python26\Scripts
Installing pip-2.6-script.py script to c:\Python26\Scripts
Installing pip-2.6.exe script to c:\Python26\Scripts
Installing pip-2.6.exe.manifest script to c:\Python26\Scripts
Exception:
Traceback (most recent call last):
File "c:\Python26\lib\site-packages\pip-0.7.1-py2.6.egg\pip\basecommand.py", line 120, in main
File "c:\Python26\lib\site-packages\pip-0.7.1-py2.6.egg\pip\commands\install.py", line 165, in run
File "c:\Python26\lib\site-packages\pip-0.7.1-py2.6.egg\pip\req.py", line 1251, in install
File "c:\Python26\lib\site-packages\pip-0.7.1-py2.6.egg\pip\req.py", line 466, in commit_uninstall
File "c:\Python26\lib\site-packages\pip-0.7.1-py2.6.egg\pip\req.py", line 1549, in commit
File "c:\Python26\lib\shutil.py", line 216, in rmtree
rmtree(fullname, ignore_errors, onerror)
File "c:\Python26\lib\shutil.py", line 216, in rmtree
rmtree(fullname, ignore_errors, onerror)
File "c:\Python26\lib\shutil.py", line 221, in rmtree
onerror(os.remove, fullname, sys.exc_info())
File "c:\Python26\lib\shutil.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:\Users\mark\AppData\Roaming\pip\pip.log
(jm) E:\python\jm>dir c:\Users\mark\AppData\Local\temp\pip-gvsove-uninstall\python26\scripts
Volume in drive C has no label.
Volume Serial Number is 74E4-FE9F
Directory of c:\Users\mark\AppData\Local\temp\pip-gvsove-uninstall\python26\scripts
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:\python\jm>del c:\Users\mark\AppData\Local\temp\pip-gvsove-uninstall\python26\scripts\pip.exe
나는 다른 누군가가 이것에 대한 방법을 알아 냈기를 바랍니다. 리눅스에서는 문제가 없습니다 ....
easy_install -U pip
:-)
python을 기본 실행 파일로 사용하여 pip를 스크립트로 실행합니다.
python -m pip install -U pip
[2015-11-15 업데이트]이 게시물은 쓸모없고 오래되었습니다. 현재 모범 사례는 pip에 따라 다음을 사용하는 것입니다.
python -m pip install -U pip setuptools
그것은 사용할 필요는 없습니다 easy_install
에서 setuptools에 . pip-installer 페이지 에서 pip를 업데이트하는 권장 절차 는 get-pip.py
.
To install or upgrade pip, securely download
get-pip.py
.
You can use the following in a Bash shell like msysgit's Git Bash.
user@machine ~$ curl -L https://raw.githubusercontent.com/pypa/pip/master/contrib/get-pip.py | python
Use the -L
option to follow redirects. Recently GitHub changed the url for raw content, so the old raw get-pip.py
url has been redirected and on the pip website the url was changed. If successful, you should see the following:
$ curl -L https://raw.githubusercontent.com/pypa/pip/master/contrib/get-pip.py | python
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 1309k 100 1309k 0 0 364k 0 0:00:03 0:00:03 --:--:-- 366k
Downloading/unpacking pip from https://pypi.python.org/packages/py2.py3/p/pip/pip-1.5.6-py2.py3-none-any.whl#md5=4d4fb4b69df6731c7aeaadd6300bc1f2
Installing collected packages: pip
Found existing installation: pip 1.5.4
Uninstalling pip:
Successfully uninstalled pip
Successfully installed pip
Cleaning up...
You can modify this for the Windows command line, but first if you don't have libcurl, download a Windows binary from Curl. You'll want to scroll all the way to the bottom and get Günter Knauf's current official Win32 binary (currently 7.29) and unzip it. Don't worry about it being 32-bit versus 64-bit. Just make sure you get the one with all the bells and whistles (ssl, zlib, etc.). Now navigate to the folder where you downloaded curl, probably c:\Users\<you>\Downloads
, open the extracted folder, probably curl-7.29.0-rtmp-ssh2-ssl-sspi-zlib-idn-static-bin-w32
, and you should find curl.exe
. Yay! Now in a windows shell type this after the prompt (which will have your username instead of myusername
), replacing path\to\Curl\
with the path to the downloaded curl.exe
file.
C:\Users\myusername> path\to\Curl\curl.exe -kL https://bootstrap.pypa.io/get-pip.py | python
You need the -k
option to allow curl to access the secure GitHub pip site without certs. Also, thanks Piotr Dobrogost for telling me about Windows pipes, |
, which saves the step of saving the file.
If you already have the latest version of pip you will get the following message:
$ curl https://bootstrap.pypa.io/get-pip.py | python
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 1309k 100 1309k 0 0 369k 0 0:00:03 0:00:03 --:--:-- 371k
Requirement already up-to-date: pip in c:\python27\lib\site-packages
Cleaning up...
Also works just fine in virtualenvs.
Try:
Right Click Anaconda Prompt (Run as Admin)
>> conda update pip
(If you are using Anaconda. PS: It worked for me)
pip install pip --upgrade
Note: Make sure you are running command Prompt in administrator mode
Hey i Just able to Upgrade PIP on Python 36 with Following Command in CMD
python -m pip install --upgrade pip
ReferenceURL : https://stackoverflow.com/questions/4379970/any-idea-how-to-update-python-pip-on-a-windows-box
'Programing' 카테고리의 다른 글
컨트롤에 코드 블록 (예 : <%… %>)이 포함되어 있으므로 컨트롤 컬렉션을 수정할 수 없습니다. (0) | 2021.01.05 |
---|---|
node.js 표준 모듈의 전역 변수? (0) | 2021.01.05 |
LINQ + Foreach 대 Foreach + If (0) | 2021.01.05 |
처리중인 AppDomain 나열 (0) | 2020.12.31 |
개행 문자를 사용할 수 있는데 왜 endl을 사용합니까? (0) | 2020.12.31 |