pip는 python 관련 패키지를 설치할 때 사용하는 툴로써 python 설치 시 포함되지 않기 때문에 별도로 설치해야 합니다.
1. wget 으로 압축 파일을 내려받습니다.
1 2 3 4 5 6 7 8 9 10 11 12 | $ wget https://pypi.python.org/packages/5f/ad/1fde06877a8d7d5c9b60eff7de2d452f639916ae1d48f0b8f97bf97e570a/distribute-0.7.3.zip --2017-11-06 13:43:41-- https://pypi.python.org/packages/5f/ad/1fde06877a8d7d5c9b60eff7de2d452f639916ae1d48f0b8f97bf97e570a/distribute-0.7.3.zip Resolving pypi.python.org (pypi.python.org)... 151.101.72.223, 2a04:4e42:11::223 Connecting to pypi.python.org (pypi.python.org)|151.101.72.223|:443... connected. HTTP request sent, awaiting response... 200 OK Length: 145378 (142K) [application/octet-stream] Saving to: ‘distribute-0.7.3.zip’ distribute-0.7.3.zip 100%[==============================================>] 141.97K --.-KB/s in 0.1s 2017-11-06 13:43:41 (1.04 MB/s) - ‘distribute-0.7.3.zip’ saved [145378/145378] | cs |
* distribute-0.7.3.zip 의 링크 주소는 아래와 같습니다.
: https://pypi.python.org/packages/5f/ad/1fde06877a8d7d5c9b60eff7de2d452f639916ae1d48f0b8f97bf97e570a/distribute-0.7.3.zip
2. 압축 파일 확인
1 2 3 | $ ll |grep distribute-0.7.3.zip -rw-rw-r-- 1 user user 145378 4월 24 2016 distribute-0.7.3.zip | cs |
3. 압축 해제
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 | $ unzip distribute-0.7.3.zip Archive: distribute-0.7.3.zip inflating: distribute-0.7.3/MANIFEST.in inflating: distribute-0.7.3/PKG-INFO inflating: distribute-0.7.3/pkg_resources.py inflating: distribute-0.7.3/setup.cfg inflating: distribute-0.7.3/setup.py inflating: distribute-0.7.3/distribute.egg-info/dependency_links.txt inflating: distribute-0.7.3/distribute.egg-info/PKG-INFO inflating: distribute-0.7.3/distribute.egg-info/requires.txt inflating: distribute-0.7.3/distribute.egg-info/SOURCES.txt inflating: distribute-0.7.3/distribute.egg-info/top_level.txt inflating: distribute-0.7.3/distribute.egg-info/zip-safe inflating: distribute-0.7.3/setuptools/archive_util.py inflating: distribute-0.7.3/setuptools/compat.py inflating: distribute-0.7.3/setuptools/depends.py inflating: distribute-0.7.3/setuptools/dist.py inflating: distribute-0.7.3/setuptools/extension.py inflating: distribute-0.7.3/setuptools/package_index.py inflating: distribute-0.7.3/setuptools/py24compat.py inflating: distribute-0.7.3/setuptools/py27compat.py inflating: distribute-0.7.3/setuptools/sandbox.py inflating: distribute-0.7.3/setuptools/script template (dev).py inflating: distribute-0.7.3/setuptools/script template.py inflating: distribute-0.7.3/setuptools/site-patch.py inflating: distribute-0.7.3/setuptools/ssl_support.py inflating: distribute-0.7.3/setuptools/__init__.py inflating: distribute-0.7.3/setuptools/command/alias.py inflating: distribute-0.7.3/setuptools/command/bdist_egg.py inflating: distribute-0.7.3/setuptools/command/bdist_rpm.py inflating: distribute-0.7.3/setuptools/command/bdist_wininst.py inflating: distribute-0.7.3/setuptools/command/build_ext.py inflating: distribute-0.7.3/setuptools/command/build_py.py inflating: distribute-0.7.3/setuptools/command/develop.py inflating: distribute-0.7.3/setuptools/command/easy_install.py inflating: distribute-0.7.3/setuptools/command/egg_info.py inflating: distribute-0.7.3/setuptools/command/install.py inflating: distribute-0.7.3/setuptools/command/install_egg_info.py inflating: distribute-0.7.3/setuptools/command/install_lib.py inflating: distribute-0.7.3/setuptools/command/install_scripts.py inflating: distribute-0.7.3/setuptools/command/launcher manifest.xml inflating: distribute-0.7.3/setuptools/command/register.py inflating: distribute-0.7.3/setuptools/command/rotate.py inflating: distribute-0.7.3/setuptools/command/saveopts.py inflating: distribute-0.7.3/setuptools/command/sdist.py inflating: distribute-0.7.3/setuptools/command/setopt.py inflating: distribute-0.7.3/setuptools/command/test.py inflating: distribute-0.7.3/setuptools/command/upload.py inflating: distribute-0.7.3/setuptools/command/upload_docs.py inflating: distribute-0.7.3/setuptools/command/__init__.py inflating: distribute-0.7.3/setuptools.egg-info/dependency_links.txt inflating: distribute-0.7.3/setuptools.egg-info/entry_points.txt inflating: distribute-0.7.3/setuptools.egg-info/entry_points.txt.orig inflating: distribute-0.7.3/setuptools.egg-info/PKG-INFO inflating: distribute-0.7.3/setuptools.egg-info/requires.txt inflating: distribute-0.7.3/setuptools.egg-info/requires.txt.orig inflating: distribute-0.7.3/setuptools.egg-info/SOURCES.txt inflating: distribute-0.7.3/setuptools.egg-info/top_level.txt inflating: distribute-0.7.3/setuptools.egg-info/zip-safe | cs |
4. 압축 해제 후 distribute-0.7.3 디렉터리에서 아래와 같이 명령어를 실행합니다.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 | $ sudo python setup.py install running install running bdist_egg running egg_info writing requirements to distribute.egg-info/requires.txt writing distribute.egg-info/PKG-INFO writing top-level names to distribute.egg-info/top_level.txt writing dependency_links to distribute.egg-info/dependency_links.txt reading manifest file 'distribute.egg-info/SOURCES.txt' reading manifest template 'MANIFEST.in' writing manifest file 'distribute.egg-info/SOURCES.txt' installing library code to build/bdist.linux-x86_64/egg running install_lib warning: install_lib: 'build/lib' does not exist -- no Python modules to install creating build/bdist.linux-x86_64/egg creating build/bdist.linux-x86_64/egg/EGG-INFO copying distribute.egg-info/PKG-INFO -> build/bdist.linux-x86_64/egg/EGG-INFO copying distribute.egg-info/SOURCES.txt -> build/bdist.linux-x86_64/egg/EGG-INFO copying distribute.egg-info/dependency_links.txt -> build/bdist.linux-x86_64/egg/EGG-INFO copying distribute.egg-info/requires.txt -> build/bdist.linux-x86_64/egg/EGG-INFO copying distribute.egg-info/top_level.txt -> build/bdist.linux-x86_64/egg/EGG-INFO copying distribute.egg-info/zip-safe -> build/bdist.linux-x86_64/egg/EGG-INFO creating 'dist/distribute-0.7.3-py2.7.egg' and adding 'build/bdist.linux-x86_64/egg' to it removing 'build/bdist.linux-x86_64/egg' (and everything under it) Processing distribute-0.7.3-py2.7.egg Removing /usr/lib/python2.7/site-packages/distribute-0.7.3-py2.7.egg Copying distribute-0.7.3-py2.7.egg to /usr/lib/python2.7/site-packages Removing distribute 0.7.3 from easy-install.pth file distribute 0.7.3 is already the active version in easy-install.pth Installed /usr/lib/python2.7/site-packages/distribute-0.7.3-py2.7.egg Processing dependencies for distribute==0.7.3 Searching for setuptools==0.8b2 Best match: setuptools 0.8b2 Adding setuptools 0.8b2 to easy-install.pth file Installing easy_install script to /usr/bin Installing easy_install-2.7 script to /usr/bin Using /test/distribute-0.7.3 Finished processing dependencies for distribute==0.7.3 | cs |
5. pip 설치
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 | $ sudo easy_install pip Searching for pip Reading https://pypi.python.org/simple/pip/ Best match: pip 9.0.1 Downloading https://pypi.python.org/packages/11/b6/abcb525026a4be042b486df43905d6893fb04f05aac21c32c638e939e447/pip-9.0.1.tar.gz#md5=35f01da33009719497f01a4ba69d63c9 Processing pip-9.0.1.tar.gz Writing /tmp/easy_install-cBl1k_/pip-9.0.1/setup.cfg Running pip-9.0.1/setup.py -q bdist_egg --dist-dir /tmp/easy_install-cBl1k_/pip-9.0.1/egg-dist-tmp-pFMi63 /usr/lib64/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'python_requires' warnings.warn(msg) warning: no previously-included files found matching '.coveragerc' warning: no previously-included files found matching '.mailmap' warning: no previously-included files found matching '.travis.yml' warning: no previously-included files found matching '.landscape.yml' warning: no previously-included files found matching 'pip/_vendor/Makefile' warning: no previously-included files found matching 'tox.ini' warning: no previously-included files found matching 'dev-requirements.txt' warning: no previously-included files found matching 'appveyor.yml' no previously-included directories found matching '.github' no previously-included directories found matching '.travis' no previously-included directories found matching 'docs/_build' no previously-included directories found matching 'contrib' no previously-included directories found matching 'tasks' no previously-included directories found matching 'tests' Adding pip 9.0.1 to easy-install.pth file Installing pip script to /usr/bin Installing pip2.7 script to /usr/bin Installing pip2 script to /usr/bin Installed /usr/lib/python2.7/site-packages/pip-9.0.1-py2.7.egg Processing dependencies for pip Finished processing dependencies for pip | cs |
6. python 설치 확인 및 실행
1 2 3 4 5 6 | $ python Python 2.7.5 (default, Aug 4 2017, 00:39:18) [GCC 4.8.5 20150623 (Red Hat 4.8.5-16)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> | cs |
'Operating System > Linux' 카테고리의 다른 글
centos user 추가 (0) | 2017.11.06 |
---|---|
ubuntu 설치된 패키지 목록 확인 (0) | 2017.11.06 |
centos zip 설치, 압축 및 압축 해제 (0) | 2017.11.06 |
centos wget 설치 (0) | 2017.11.06 |
ubuntu python pip 설치 (0) | 2017.11.06 |