python(django)2016. 4. 28. 17:00

$ pip

-bash: pip: command not found


python을 배워보려는데, pip 명령어를 모른다네요.

설치하렵니다.



python의 각종 패키지를 설치하고 관리하는 툴, pip를 설치해봤습니다.



터미널을 실행시키고 아래와 같이 입력하고 실행합니다.


$ curl https://bootstrap.pypa.io/get-pip.py > get-pip.py

  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current

                                 Dload  Upload   Total   Spent    Left  Speed

100 1487k  100 1487k    0     0   531k      0  0:00:02  0:00:02 --:--:--  531k



그 다음, 다운받은 get-pip.py를 실행시킵니다.


$ sudo python get-pip.py

Password:

The directory '/Users/mymac/Library/Caches/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.

The directory '/Users/mymac/Library/Caches/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.

Collecting pip

  Downloading pip-8.1.1-py2.py3-none-any.whl (1.2MB)

    100% |████████████████████████████████| 1.2MB 548kB/s 

Collecting wheel

  Downloading wheel-0.29.0-py2.py3-none-any.whl (66kB)

    100% |████████████████████████████████| 71kB 7.9MB/s 

Installing collected packages: pip, wheel

Successfully installed pip-8.1.1 wheel-0.29.0



이제 pip 버전을 확인해보면..


$ pip -V

pip 8.1.1 from /Library/Python/2.7/site-packages (python 2.7)



오!!! 

설치가 되었네요! ^^


갈 길이 멉니다. @.@



Posted by 데브로망스