본문 바로가기
파이썬

mac에 homebrew / pip / virtualenv설치 + python 버전 확인

by 혜룐 2015. 11. 10.
mac 셋팅
1) homebrew
여기! : http://brew.sh/index_ko.html
catherineui-MacBook-Pro:scala catherine$ ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
==>This script will install:
/usr/local/bin/brew
/usr/local/Library/...
/usr/local/share/man/man1/brew.1
Press RETURN to continue or any other key to abort
==>/usr/bin/sudo /bin/mkdir /usr/local
Password:
==>/usr/bin/sudo /bin/chmod g+rwx /usr/local
==>/usr/bin/sudo /usr/bin/chgrp admin /usr/local
==>/usr/bin/sudo /bin/mkdir /Library/Caches/Homebrew
==>/usr/bin/sudo /bin/chmod g+rwx /Library/Caches/Homebrew
==>Downloading and installing Homebrew...
remote: Counting objects: 3545, done.
remote: Compressing objects: 100% (3395/3395), done.
remote: Total 3545 (delta 35), reused 1499 (delta 19), pack-reused 0
Receiving objects: 100% (3545/3545), 2.68 MiB | 1.31 MiB/s, done.
Resolving deltas: 100% (35/35), done.
From https://github.com/Homebrew/homebrew
* [new branch] master ->origin/master
HEAD is now at d12b17e Simplify substitution
==>Installation successful!
==>Next steps
Run `brew help` to get started
catherineui-MacBook-Pro:scala catherine$
2) pip
catherineui-MacBook-Pro:scala catherine$ sudo easy_install pip
Searching for pip
Reading https://pypi.python.org/simple/pip/
Best match: pip 6.1.1
Downloading https://pypi.python.org/packages/source/p/pip/pip-6.1.1.tar.gz#md5=6b19e0a934d982a5a4b798e957cb6d45
Processing pip-6.1.1.tar.gz
Writing /tmp/easy_install-RxMwi7/pip-6.1.1/setup.cfg
Running pip-6.1.1/setup.py -q bdist_egg --dist-dir /tmp/easy_install-RxMwi7/pip-6.1.1/egg-dist-tmp-F6IrZ_
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 'pip/_vendor/Makefile'
warning: no previously-included files found matching 'tox.ini'
warning: no previously-included files found matching 'dev-requirements.txt'
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 6.1.1 to easy-install.pth file
Installing pip script to /usr/local/bin
Installing pip2.7 script to /usr/local/bin
Installing pip2 script to /usr/local/bin
Installed /Library/Python/2.7/site-packages/pip-6.1.1-py2.7.egg
Processing dependencies for pip
Finished processing dependencies for pip
catherineui-MacBook-Pro:scala catherine$ pip
Usage:
pip<command>[options]
3) virtualenv
catherineui-MacBook-Pro:scala catherine$ sudo pip install virtualenv
The directory '/Users/catherine/Library/Logs/pip' or its parent directory is not owned by the current user and the debug log 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/catherine/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.
/Library/Python/2.7/site-packages/pip-6.1.1-py2.7.egg/pip/_vendor/requests/packages/urllib3/util/ssl_.py:79: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. For more information, see https://urllib3.readthedocs.org/en/latest/security.html#insecureplatformwarning." target="_blank">https://urllib3.readthedocs.org/en/latest/security.html#insecureplatformwarning.
InsecurePlatformWarning
The directory '/Users/catherine/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.
Collecting virtualenv
/Library/Python/2.7/site-packages/pip-6.1.1-py2.7.egg/pip/_vendor/requests/packages/urllib3/util/ssl_.py:79: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. For more information, see https://urllib3.readthedocs.org/en/latest/security.html#insecureplatformwarning." target="_blank">https://urllib3.readthedocs.org/en/latest/security.html#insecureplatformwarning.
InsecurePlatformWarning
Downloading virtualenv-12.1.1-py2.py3-none-any.whl (1.6MB)
100% |████████████████████████████████| 1.6MB 296kB/s
Installing collected packages: virtualenv
Successfully installed virtualenv-12.1.1
catherineui-MacBook-Pro:scala catherine$
4) python -V
catherineui-MacBook-Pro:scala catherine$ python -V
Python 2.7.6