lion vim高亮 和 brew安装django
mac下shell的高亮
编辑 ~/.bash_profile, 加入以下代码: Bash代码 export CLICOLOR=1 export LSCOLORS=gxfxaxdxcxegedabagacad 保存,然后重启terminal,搞定,恢复正常了.
-----------
redhat下ls高亮
ls--color
vim.bashrc
aliasls='ls--color'
--------vim高亮----
cp/usr/share/vim/vimrc~/.vimrc
在.vimrc文件最后加上
syntaxon
-------
习惯了ubuntu的apt-get,redhat的yum
原来mac可以用brew干类似的活啊
参考http://hackercodex.com/2011/08/30/python-install-django-on-mac-osx-lion-10.7/
显示隐藏的文件
chflagsnohidden~/Library/
vim~/.bash_profile
export ARCHFLAGS="-arch x86_64"
ruby-e"$(curl-fsSLhttps://raw.github.com/gist/323731)"
brewupdate
brewinstallbash-completionbyobugrowlnotifyssh-copy-idwget
注意:这里不使用这个安装
sudoeasy_installvirtualenv
mkdir-p~/.local/lib/python2.7/site-packages
brewinstalltree
vim~/.bash_profile
# Path ------------------------------------------------------------ if [ -d ~/.local/bin ]; then export PATH=~/.local/bin:$PATH fi # Python path ----------------------------------------------------- if [ -d ~/.local/lib/python2.7/site-packages ]; then export PYTHONPATH=~/.local/lib/python2.7/site-packages:$PYTHONPATH fi
easy_install--prefix=~/.localvirtualenvvirtualenvwrapper
# Turn on advanced bash completion if the file exists if [ -f /usr/local/etc/bash_completion ]; then . /usr/local/etc/bash_completion fi # Locate virtualenvwrapper binary if [ -f ~/.local/bin/virtualenvwrapper.sh ]; then export VENVWRAP=~/.local/bin/virtualenvwrapper.sh fi if [ ! -z $VENVWRAP ]; then # virtualenvwrapper ------------------------------------------- # make sure env directory exits; else create it [ -d $HOME/sites/env ] || mkdir -p $HOME/sites/env export WORKON_HOME=$HOME/sites/env source $VENVWRAP # virtualenv -------------------------------------------------- export VIRTUALENV_USE_DISTRIBUTE=true # pip --------------------------------------------------------- export PIP_VIRTUALENV_BASE=$WORKON_HOME export PIP_REQUIRE_VIRTUALENV=true export PIP_RESPECT_VIRTUALENV=true export PIP_DOWNLOAD_CACHE=$HOME/.pip/cache fi
vim~/sites/env/postactivate
proj_name=${VIRTUAL_ENV##*/} # Add the active project to the PYTHONPATH if [ -d ~/sites/env/$proj_name/lib/python2.7/site-packages ]; then add2virtualenv ~/sites/env/$proj_name/lib/python2.7/site-packages fi # "cd" into the virtualenv, or its "project" folder if there is one if [ -d ~/sites/env/$proj_name/project ]; then cd ~/sites/env/$proj_name/project else cd ~/sites/env/$proj_name fi
easy_install--prefix=~/.localMercurial
这里是hg的安装略
虚拟环境
这个有意思
mkvirtualenvfoobar
注意目录自己跳转了
pipinstallDjango
装在了这里/Users/apple/Sites/env/foobar/lib/python2.7/site-packages
每次mkvirtualenvfoobar这样才能用哦!!!!
可以装多个虚拟环境,比如不同版本的django
算了不抄了看教程吧
需要brewinstalllibevent