"Python3 pip 설치"의 두 판 사이의 차이

(console 표시)
(python 사용법 등)
51번째 줄: 51번째 줄:
{{소스헤더|Windows}}
{{소스헤더|Windows}}
<source lang='console'>
<source lang='console'>
[root@zetawiki ~]# python3 get-pip.py
C:\Users\zetawiki> python get-pip.py
Collecting pip
Collecting pip
   Downloading https://files.pythonhosted.org/packages/00/b6/9cfa56b4081ad13874b0c6f96af8ce16cfbc1cb06bedf8e9164ce5551ec1/pip-19.3.1-py2.py3-none-any.whl (1.4MB)
   Downloading https://files.pythonhosted.org/packages/00/b6/9cfa56b4081ad13874b0c6f96af8ce16cfbc1cb06bedf8e9164ce5551ec1/pip-19.3.1-py2.py3-none-any.whl (1.4MB)
57번째 줄: 57번째 줄:
Installing collected packages: pip
Installing collected packages: pip
Successfully installed pip-19.3.1
Successfully installed pip-19.3.1
</source>
==이후 사용법==
{{소스헤더|Linux}}
<source lang='bash'>
[root@zetawiki ~]# python3 -m pip install -U <패키지 이름>
</source>
{{소스헤더|Windows}}
<source lang='bash'>
python -m pip install -U <패키지 이름>
</source>
</source>



2019년 12월 3일 (화) 11:38 판

  다른 뜻에 대해서는 윈도우 Python 3 설치 문서를 참조하십시오.

1 개요

python3에서 pip 설치

2 pyhton 버전 확인

python이 설치되어 있는지 확인합니다. 파이썬 버전은 3.5 이상이여야 합니다.

Linux
[root@zetawiki ~]# python3 --version
Python 3.5
Windows
C:\Users\zetawiki> python --version
Python 3.5

3 get-pip.py 다운로드 및 설치

  • 리눅스
Linux
[root@zetawiki ~]# wget https://bootstrap.pypa.io/get-pip.py
Will not apply HSTS. The HSTS database must be a regular and non-world-writable file.
ERROR: could not open HSTS store at '/home/user/.wget-hsts'. HSTS will be disabled.
--2019-01-01 00:00:00--  https://bootstrap.pypa.io/get-pip.py
Resolving bootstrap.pypa.io (bootstrap.pypa.io)... 151.101.228.175, 2a04:4e42:36::175
Connecting to bootstrap.pypa.io (bootstrap.pypa.io)|151.101.228.175|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 1775835 (1.7M) [text/x-python]
Saving to: ‘get-pip.py’

get-pip.py            100%[==================>]   1.69M  1.23MB/s    in 1.4s

2019-01-01 00:00:00 (1.23 MB/s) - ‘get-pip.py’ saved [1775835/1775835]
[root@zetawiki ~]# python3 get-pip.py
Collecting pip
  Downloading https://files.pythonhosted.org/packages/00/b6/9cfa56b4081ad13874b0c6f96af8ce16cfbc1cb06bedf8e9164ce5551ec1/pip-19.3.1-py2.py3-none-any.whl (1.4MB)
     |################################| 1.4MB 247kB/s
Installing collected packages: pip
Successfully installed pip-19.3.1
  • windows

https://bootstrap.pypa.io/get-pip.py 를 다운로드 받거나, 접속해서 모든것을 복사하신 뒤에 개별적으로 get-pip.py를 만든 후 붙여넣기를 합니다.

Windows
C:\Users\zetawiki> python get-pip.py
Collecting pip
  Downloading https://files.pythonhosted.org/packages/00/b6/9cfa56b4081ad13874b0c6f96af8ce16cfbc1cb06bedf8e9164ce5551ec1/pip-19.3.1-py2.py3-none-any.whl (1.4MB)
     |################################| 1.4MB 247kB/s
Installing collected packages: pip
Successfully installed pip-19.3.1

4 이후 사용법

Linux
[root@zetawiki ~]# python3 -m pip install -U <패키지 이름>
Windows
python -m pip install -U <패키지 이름>

5 같이 보기

6 참고

문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}