Python项目部署的三大神器
2017-04-14 22:37
489 查看
对于Python这种自带电池的语言来说,避免项目开发、部署的导致的系统混乱,为每个项目定制一个自己的环境十分重要。这三个工具都有详细的文档,建议大家有时间就阅读文档学习吧。本文只是根据自己的使用对其中常用的做简要说明。
如果你已经阅读了官方文档,我认为你大可不必浪费时间再看这篇文字了。
目录
一 pip
pip中英文官方文档
pip简介
pip安装
pip使用
二 virtualenv
virtualenv中英文官方文档
virtualenv简介
利用virtualenv 创建虚拟python环境
virtualenv使用
三 fabric
fabric中英文官方文档
fabric简介
fabric安装
fabric使用
pip-chinese-docs
如果在Windows/Linux系统中安装,传送门.
如安装
virtualenv-chinese-docs
The basic problem being addressed is one of dependencies and versions, and indirectly permissions. Imagine you have an application that needs version 1 of LibFoo, but another application requires version 2. How can you use both these applications If you install everything into
Or more generally, what if you want to install an application and leave it be If an application works, any change in its libraries or the versions of those libraries can break the application.
Also, what if you can’t install packages into the
In all these cases,
1.Django开发环境搭建
fabric-chinese-docs
如果你已经阅读了官方文档,我认为你大可不必浪费时间再看这篇文字了。
目录
一 pip
pip中英文官方文档
pip简介
pip安装
pip使用
二 virtualenv
virtualenv中英文官方文档
virtualenv简介
利用virtualenv 创建虚拟python环境
virtualenv使用
三 fabric
fabric中英文官方文档
fabric简介
fabric安装
fabric使用
一 pip
pip中英文官方文档
pip.pypa.iopip-chinese-docs
pip简介
pip 用来解决项目依赖问题。将项目所有依赖的第三方库写在一个requirements.txt 中用pip批量安装。一般和virtualenv 配合使用,将所有包安装在virtualenv 的环境中。这样既可以让我们的系统保持高度的纯净。pip安装
在Python 3.5之后会在安装时勾选同时安装
pip省去很多麻烦。
如果在Windows/Linux系统中安装,传送门.
pip使用
pip install [options] <requirement specifier> ... pip install [options] -r <requirements file> ... pip install [options] [-e] <vcs project url> ... pip install [options] [-e] <local project path> ... pip install [options] <archive url/path> ...
如安装
virtualenv
pip install virtualenv
二 virtualenv
virtualenv中英文官方文档
virtualenv.pypa.iovirtualenv-chinese-docs
virtualenv简介
virtualenv 用来建立一个虚拟的python环境,一个专属于项目的python环境。用virtualenv 来保持一个干净的环境非常有用。virtualenv自己的介绍virtualenvis a tool to create isolated Python environments.
The basic problem being addressed is one of dependencies and versions, and indirectly permissions. Imagine you have an application that needs version 1 of LibFoo, but another application requires version 2. How can you use both these applications If you install everything into
usrlibpython2.7site-packages(or whatever your platform’s standard location is), it’s easy to end up in a situation where you unintentionally upgrade an application that shouldn’t be upgraded.
Or more generally, what if you want to install an application and leave it be If an application works, any change in its libraries or the versions of those libraries can break the application.
Also, what if you can’t install packages into the
global site-packagesdirectory For instance, on a shared host.
In all these cases,
virtualenvcan help you. It creates an environment that has its own installation directories, that doesn’t share libraries with other virtualenv environments (and optionally doesn’t access the globally installed libraries either). —— [ virtualenv-introduction ]
利用virtualenv 创建虚拟python环境
使用virtualenv来创建虚拟python环境。virtualenv本是一个独立的工具,官网在这里:https://pypi.python.org/pypi/virtualenvvirtualenv使用
另一篇文章1.Django开发环境搭建
三 fabric
fabric中英文官方文档
fabfile.orgfabric-chinese-docs
fabric简介
fabric安装
fabric使用
end相关文章推荐
- python的django项目uwsgi+nginx的部署
- 在apache上部署web.py项目(python2.7+web.py+mod_wsgi+apache2.2)
- django项目部署-python服务器搭建
- apache2.4+python2.7+mod wsgi部署django1.10项目
- 从零开始自动部署Django项目(二):使用Python编写Git Hooks
- Linux+Django+Python+Wsgi配置过程 Linux下配置Apache+Mod_Wsgi+Django环境 部署django项目
- Python三大神器之virtual使用
- 一步步在SAE 部署自己的python项目
- Python-在CentOS7上使用nginx+uwsgi部署Flask框架开发的Web项目
- Python 三大神器
- 全面剖析Python的Django框架中的项目部署技巧第1/2页
- Python脚本实现项目工程自动远程部署
- ubuntu python3.5 django1.8.5 apache2.4 wsgi mysql部署django项目
- python使用Visual Studio 2015作为IDE开发django项目的环境部署
- python三大神器之一fabric使用
- 把python项目部署到centos里
- 项目部署 python fabric
- Linux下将Python的Django项目部署到Apache服务器
- Python 三大神器
- 详细描述一次最新Heroku部署python web项目的完整过程