프로그램 자료/Python

pip 활용하기

motolies 2015. 10. 16. 17:20

출처 : http://ngee.tistory.com/178




1. pip search 검색하고자 하는 키워드


예를 들면 이거죠. 몽고db랑 관련있는 python package를 찾아내라는...


example : pip search mongodb


m@b:~/dev/test$ pip search mongodb

pymongo                   - Python driver for MongoDB <http://www.mongodb.org>

  INSTALLED: 2.5.2 (latest)

mongoengine               - MongoEngine is a Python Object-Document Mapper for working with MongoDB.

mongokit                  - Python mongodb kit

humbledb                  - HumbleDB - MongoDB Object-Document Mapper

django-mongonaut          - An introspective interface for Django and MongoDB

Monufacture               - A lightweight factory framework for easily generating test data in MongoDB

mongomodels               - A simple ODM for MongoDB

monk                      - An unobtrusive data modeling, manipulation and validation library. MongoDB included.

m01.mongo                 - MongoDB connection pool and container implementation for Zope3

Flask-MongoAlchemy        - Add Flask support for MongoDB using MongoAlchemy.

mongotor                  - (MongoDB + Tornado) is an asynchronous driver and toolkit for working with MongoDB inside a Tornado app

django-mongokit           - Bridging Django to MongoDB with the MongoKit ODM

manga                     - Data abstraction layer for MongoDB.

minimongo                 - Minimal database Model management for MongoDB

asyncmongo                - Asynchronous library for accessing mongodb built upon the tornado IOLoop.

jaraco.modb               - MongoDB Object DataBase (MODB) for Python objects

mongoctl                  - MongoDB command line utility

rod.recipe.mongodb        - ZC Buildout recipe for setting up mongoDB.

mongodb_gridfs_beaker     - Beaker backend to write sessions and caches to a MongoDB GridFS

scalymongo                - A scaling-centric MongoDB object document mapper

mongodoc                  - Creates a uml-like diagram for a nested mongodb document

m01.stub                  - MongoDB server stub setup


보시면 저는 pymongo를 설치해놨죠.. 그래서 INSATLLED : version 이라고 나오는 것이구요.


자 찾았으면 설치해야죠. root 권한을 획득하시구용.



2. pip install 설치하고자 하는 패키지 이름


위 1번에서 검색한 녀석의 이름을 사용하시면 됩니다.


물론 root 권한에서요. 그럼 저는 3번째로 나온 mongokit 을 설치해볼께영.


example : pip install mongokit


root@b:.../dev/test# pip install mongokit

Downloading/unpacking mongokit

  Downloading mongokit-0.8.3.tar.gz (68Kb): 68Kb downloaded

  Running setup.py egg_info for package mongokit

    

Requirement already satisfied (use --upgrade to upgrade): pymongo>=2.0.1 in /usr/local/lib/python2.7/dist-packages (from mongokit)

Installing collected packages: mongokit

  Running setup.py install for mongokit

    

Successfully installed mongokit

Cleaning up...


간단하게 설치완료!!!! 


그럼 설치한 것을 지우고 싶을 때는여???



3. pip uninstall 삭제하고자 하는 패키지 이름


2번에서 설치한 mongokit을 삭제해보죠.


example : pip uninstall mongokit


root@b:..../dev/test# pip uninstall mongokit

Uninstalling mongokit:

  /usr/local/lib/python2.7/dist-packages/mongokit

  /usr/local/lib/python2.7/dist-packages/mongokit-0.8.3.egg-info

Proceed (y/n)? y

  Successfully uninstalled mongokit


삭제도 쉽죠.


마지막은 최신버전으로 업데이트 해라 입니다.



4. pip install -u 업데이트하고자 하는 패키지 이름


example : pip install --upgrade pymongo


이건 예제를 넣지 않았어용 ㅎ