There were many articles that used pythonz to install Python, but [here](http://kesin.hatenablog.com/entry/2013/07/22/%E7%B5%90%E5%B1%80Python% E3% 81% AFvirtualenv% E3% 81% A7% E7% AE% A1% E7% 90% 86% E3% 81% 97% E3% 81% A6% E3% 81% BF% E3% 82% 8B% E3% 81% 93% E3% 81% A8% E3% 81% AB% E3% 81% 97% E3% 81% 9F "Kesin's diary programming article is the main article. Python rate is high") to install Python Is done with homebrew.
#Install 2 series python
% brew install python
#Install 3 series python
% brew install python3
See this area for virtualenv and virtualenvwrappe.
% pip install virtualenv virtualenvwrapper
Add the following to .zshrc
.zshrc
#Specify python used by virtualenvwrapper
export VIRTUALENVWRAPPER_PYTHON=/usr/local/bin/python
export VIRTUALENVWRAPPER_VIRTUALENV=/usr/local/bin/virtualenv
#Even if you installed pip globally,Install the package in the virtualenv environment.
export PIP_RESPECT_VIRTUALENV=true
source "/usr/local/bin/virtualenvwrapper.sh"
#Create an environment called py2 that uses python2 series
% mkvirtualenv py2 --python /usr/local/bin/python2
#Create an environment called py3 that uses python3 series
% mkvirtualenv py3 --python /usr/local/bin/python3
#Check the created virtual environment
% lsvirtualenv
py2
===
py3
===
(py3)
virtualenvwrapper 3.5 --command reference
・ [Kesin's diary The main article is programming. Python rate is high-I decided to manage Python with virtualenv](http://kesin.hatenablog.com/entry/2013/07/22/%E7%B5%90%E5%B1%80Python% E3% 81% AFvirtualenv% E3% 81% A7% E7% AE% A1% E7% 90% 86% E3% 81% 97% E3% 81% A6% E3% 81% BF% E3% 82% 8B% E3% 81% 93% E3% 81% A8% E3% 81% AB% E3% 81% 97% E3% 81% 9F "Kesin's diary programming articles are the main. Python rate is high") -About Python today --VIRTUALENV ・ [Kanonji's blog-Note on building Python environment with pythonz, virtualenv and virtualenvwrapper](http://kanonji.info/blog/2013/07/11/pythonz%E3%81%A8virtualenv%E3%81%A8virtualenvwrapper%E3 % 81% A7python% E7% 92% B0% E5% A2% 83% E6% A7% 8B% E7% AF% 89% E3% 81% AE% E3% 83% A1% E3% 83% A2 / Python --About VIRTUALENV ")
Recommended Posts