lion vim高亮 和 brew安装django

mac下shell的高亮
http://goddy128.iteye.com/blog/537683
编辑 ~/.bash_profile, 加入以下代码:
Bash代码
export CLICOLOR=1
export LSCOLORS=gxfxaxdxcxegedabagacad

保存,然后重启terminal,搞定,恢复正常了.

-----------
redhat下ls高亮
ls --color
vim .bashrc
alias ls='ls --color'

--------vim高亮----
cp /usr/share/vim/vimrc ~ /.vimrc
在.vimrc文件最后加上
syntax on
-------
习惯了ubuntu的apt-get,redhat的yum
原来mac可以用brew干类似的活啊

参考[color=red]http://hackercodex.com/2011/08/30/python-install-django-on-mac-osx-lion-10.7/[/color]
显示隐藏的文件
chflags nohidden ~/Library/

vim ~/.bash_profile
export ARCHFLAGS="-arch x86_64"


ruby -e "$(curl -fsSL https://raw.github.com/gist/323731)"

brew update

brew install bash-completion byobu growlnotify ssh-copy-id wget

[color=red]注意:这里不使用这个安装
sudo easy_install virtualenv[/color]

mkdir -p ~/.local/lib/python2.7/site-packages
brew install tree
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=~/.local virtualenv virtualenvwrapper

# 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


[color=red]easy_install --prefix=~/.local Mercurial
这里是hg的安装略[/color]
虚拟环境
这个有意思
mkvirtualenv foobar
注意目录自己跳转了
pip install Django
装在了这里/Users/apple/Sites/env/foobar/lib/python2.7/site-packages
每次mkvirtualenv foobar这样才能用哦!!!!
可以装多个虚拟环境,比如不同版本的django

算了不抄了看教程吧

需要brew install libevent
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值