mac 上开发环境的安装(djang, git , virtualenv)
2016-02-19 10:07
316 查看
本环境将包括:
Python 2.7
Django 1.5
Git
Homebrew
pip
virtualenv
首先需要安装 Homebrew,复制并粘贴下列代码到 Terminal。
[html] view
plain copy
print?
/usr/bin/ruby -e "$(/usr/bin/curl -fksSL https://raw.github.com/mxcl/homebrew/master/Library/Contributions/install_homebrew.rb)"
安装 Git。在 Terminal 下输入:
[html] view
plain copy
print?
brew install git
安装 Python。
[html] view
plain copy
print?
brew install python
安装 pip。
[html] view
plain copy
print?
easy_install pip
安装 virtualenv。
[html] view
plain copy
print?
pip install virtualenv
创建 virtualenv。
[html] view
plain copy
print?
mkdir new_directory_name
cd new_directory_name
virtualenv environment_name
运行下列命令来激活 virtualenv。
[html] view
plain copy
print?
source environment_name/bin/activate
此时在安装 Django。
[html] view
plain copy
print?
pip install django
至此,独立的 Django 开发环境搭建完毕。
Python 2.7
Django 1.5
Git
Homebrew
pip
virtualenv
首先需要安装 Homebrew,复制并粘贴下列代码到 Terminal。
[html] view
plain copy
print?
/usr/bin/ruby -e "$(/usr/bin/curl -fksSL https://raw.github.com/mxcl/homebrew/master/Library/Contributions/install_homebrew.rb)"
安装 Git。在 Terminal 下输入:
[html] view
plain copy
print?
brew install git
安装 Python。
[html] view
plain copy
print?
brew install python
安装 pip。
[html] view
plain copy
print?
easy_install pip
安装 virtualenv。
[html] view
plain copy
print?
pip install virtualenv
创建 virtualenv。
[html] view
plain copy
print?
mkdir new_directory_name
cd new_directory_name
virtualenv environment_name
运行下列命令来激活 virtualenv。
[html] view
plain copy
print?
source environment_name/bin/activate
此时在安装 Django。
[html] view
plain copy
print?
pip install django
至此,独立的 Django 开发环境搭建完毕。
相关文章推荐
- MySQL数据处理函数
- xntp的配置
- Type Java compiler level does not match the version of the installed Java project facet
- Java 5种字符串拼接方式性能比较。
- Android 编译流程
- cinder nfs backend配置实例
- nginx 并发设置
- Android中禁用掉多点触控
- ios nil、NULL和NSNull 的使用
- phpMySQL录入数据
- 密码框的提示信息的显示问题
- controller,link,compile不同
- JS实现精确加减乘除
- 七天学会ASP.NET MVC (一)——深入理解ASP.NET MVC
- 常用LINUX命令
- [网络流24题] 最小路径覆盖问题
- android的四大组件
- C与C++中使用带默认值的参数
- PHP编程中10个最常见的错误
- SQL中distinct与order by联合使用应该注意的问题