본문 바로가기
파이썬

로컬파이썬패키지 중 일부패키지를 삭제 : pip uninstall 패키지명

by 혜룐 2015. 11. 10.
파이썬 환경을 따로 구성하지 않고 사용했더니, 브랜치에 맞는 패키지호환성때문에
로컬 파이썬패키지중 버전이 자꾸 바뀌는 패키지를 삭제 하고
virtualenv 으로 파이썬패키지를 관리하려고 한다.
1)
로컬파이썬패키지중
일부패키지를
삭제
catherineui-MacBook-Pro:K catherine$ pip
uninstall
K-common
Uninstalling K-common:
/usr/local/lib/python2.7/site-packages/K-common.egg-link
Proceed (y/n)? y
Successfully uninstalled K-common
2) 삭제되었는지 확인
catherineui-MacBook-Pro:K catherine$ pip list
3) virtualen 환경에서 삭제한 패키지를 설치
catherineui-MacBook-Pro:Kr catherine$
. bin/activate
(K)
catherineui-MacBook-Pro:Kr catherine$
pip install -r requirements.txt --upgrade
4) 설치 로그를 훑어보면..
Downloading/unpacking Kr-common from git+ssh://git@github.no.com/f/Kr_common.git@1.1.0 (from -r requirements.txt (line 19))
Cloning ssh://git@github.no.com/rtf/Kr_common.git (to 1.1.0) to /Users/catherine/PycharmProjects/Kr_org/Kr/build/K-common
Running setup.py (path:/Users/catherine/PycharmProjects/Kr_org/Kr/build/Kr-common/setup.py) egg_info for package K-common
.. 중략 ..
Installing collected packages: t-c-do, K-common
Found existing installation: t-c-do 1.6.1
Uninstalling t-c-do:
Successfully uninstalled t-c-do
Running setup.py install for t-c-do
Running setup.py install for K-common
Successfully installed t-c-do K-common
requirement.txt에 명시되어있고 (라인 19줄)
패키지설치하는 것을 알 수 있다.