欢迎来到Doc100.Net免费学习资源知识分享平台!
您的位置:首页 > 程序异常 >

lion vim高亮 跟 brew安装django

更新时间: 2014-01-05 02:46:05 责任编辑: Author_N1

 

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干类似的活啊

参考http://hackercodex.com/2011/08/30/python-install-django-on-mac-osx-lion-10.7/
显示隐藏的文件
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

注意:这里不使用这个安装
sudo easy_install virtualenv


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


easy_install --prefix=~/.local Mercurial
这里是hg的安装略

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

算了不抄了看教程吧

需要brew install libevent
上一篇:上一篇
下一篇:下一篇

 

随机推荐程序问答结果

 

 

如对文章有任何疑问请提交到问题反馈,或者您对内容不满意,请您反馈给我们DOC100.NET论坛发贴求解。
DOC100.NET资源网,机器学习分类整理更新日期::2014-01-05 02:46:05
如需转载,请注明文章出处和来源网址:http://www.doc100.net/bugs/t/14182/
本文WWW.DOC100.NET DOC100.NET版权所有。