/usr/share/doc/python-werkzeug-doc/html/installation.html is in python-werkzeug-doc 0.10.4+dfsg1-1ubuntu1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Installation — Werkzeug 0.10.4 documentation</title>
<link rel="stylesheet" href="_static/werkzeug.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT: './',
VERSION: '0.10.4',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true
};
</script>
<script type="text/javascript" src="_static/jquery.js"></script>
<script type="text/javascript" src="_static/underscore.js"></script>
<script type="text/javascript" src="_static/doctools.js"></script>
<link rel="top" title="Werkzeug 0.10.4 documentation" href="index.html" />
<link rel="next" title="Transition to Werkzeug 1.0" href="transition.html" />
<link rel="prev" title="Documentation Overview" href="index.html" />
</head>
<body>
<div class="related">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="genindex.html" title="General Index"
accesskey="I">index</a></li>
<li class="right" >
<a href="py-modindex.html" title="Python Module Index"
>modules</a> |</li>
<li class="right" >
<a href="transition.html" title="Transition to Werkzeug 1.0"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="index.html" title="Documentation Overview"
accesskey="P">previous</a> |</li>
<li><a href="index.html">Werkzeug 0.10.4 documentation</a> »</li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body">
<div class="section" id="installation">
<h1>Installation<a class="headerlink" href="#installation" title="Permalink to this headline">¶</a></h1>
<p>Werkzeug requires at least Python 2.6 to work correctly. If you do need
to support an older version you can download an older version of Werkzeug
though we strongly recommend against that. Werkzeug currently has
experimental support for Python 3. For more information about the
Python 3 support see <a class="reference internal" href="python3.html#python3"><em>Python 3 Notes</em></a>.</p>
<div class="section" id="installing-a-released-version">
<h2>Installing a released version<a class="headerlink" href="#installing-a-released-version" title="Permalink to this headline">¶</a></h2>
<div class="section" id="as-a-python-egg-via-easy-install-or-pip">
<h3>As a Python egg (via easy_install or pip)<a class="headerlink" href="#as-a-python-egg-via-easy-install-or-pip" title="Permalink to this headline">¶</a></h3>
<p>You can install the most recent Werkzeug version using <a class="reference external" href="http://peak.telecommunity.com/DevCenter/EasyInstall">easy_install</a>:</p>
<div class="highlight-python"><div class="highlight"><pre>easy_install Werkzeug
</pre></div>
</div>
<p>Alternatively you can also use pip:</p>
<div class="highlight-python"><div class="highlight"><pre>pip install Werkzeug
</pre></div>
</div>
<p>Either way we strongly recommend using these tools in combination with
<a class="reference internal" href="#virtualenv"><em>virtualenv</em></a>.</p>
<p>This will install a Werkzeug egg in your Python installation’s <cite>site-packages</cite>
directory.</p>
</div>
<div class="section" id="from-the-tarball-release">
<h3>From the tarball release<a class="headerlink" href="#from-the-tarball-release" title="Permalink to this headline">¶</a></h3>
<ol class="arabic simple">
<li>Download the most recent tarball from the <a class="reference external" href="https://pypi.python.org/pypi/Werkzeug">download page</a>.</li>
<li>Unpack the tarball.</li>
<li><tt class="docutils literal"><span class="pre">python</span> <span class="pre">setup.py</span> <span class="pre">install</span></tt></li>
</ol>
<p>Note that the last command will automatically download and install
<a class="reference external" href="http://peak.telecommunity.com/DevCenter/setuptools">setuptools</a> if you don’t already have it installed. This requires a working
Internet connection.</p>
<p>This will install Werkzeug into your Python installation’s <cite>site-packages</cite>
directory.</p>
</div>
</div>
<div class="section" id="installing-the-development-version">
<h2>Installing the development version<a class="headerlink" href="#installing-the-development-version" title="Permalink to this headline">¶</a></h2>
<ol class="arabic simple">
<li>Install <a class="reference external" href="http://git-scm.org/">Git</a></li>
<li><tt class="docutils literal"><span class="pre">git</span> <span class="pre">clone</span> <span class="pre">git://github.com/mitsuhiko/werkzeug.git</span></tt></li>
<li><tt class="docutils literal"><span class="pre">cd</span> <span class="pre">werkzeug</span></tt></li>
<li><tt class="docutils literal"><span class="pre">pip</span> <span class="pre">install</span> <span class="pre">--editable</span> <span class="pre">.</span></tt></li>
</ol>
</div>
<div class="section" id="virtualenv">
<span id="id1"></span><h2>virtualenv<a class="headerlink" href="#virtualenv" title="Permalink to this headline">¶</a></h2>
<p>Virtualenv is probably what you want to use during development, and in
production too if you have shell access there.</p>
<p>What problem does virtualenv solve? If you like Python as I do,
chances are you want to use it for other projects besides Werkzeug-based
web applications. But the more projects you have, the more likely it is
that you will be working with different versions of Python itself, or at
least different versions of Python libraries. Let’s face it; quite often
libraries break backwards compatibility, and it’s unlikely that any serious
application will have zero dependencies. So what do you do if two or more
of your projects have conflicting dependencies?</p>
<p>Virtualenv to the rescue! It basically enables multiple side-by-side
installations of Python, one for each project. It doesn’t actually
install separate copies of Python, but it does provide a clever way
to keep different project environments isolated.</p>
<p>So let’s see how virtualenv works!</p>
<p>If you are on Mac OS X or Linux, chances are that one of the following two
commands will work for you:</p>
<div class="highlight-python"><div class="highlight"><pre>$ sudo easy_install virtualenv
</pre></div>
</div>
<p>or even better:</p>
<div class="highlight-python"><div class="highlight"><pre>$ sudo pip install virtualenv
</pre></div>
</div>
<p>One of these will probably install virtualenv on your system. Maybe it’s
even in your package manager. If you use Ubuntu, try:</p>
<div class="highlight-python"><div class="highlight"><pre>$ sudo apt-get install python-virtualenv
</pre></div>
</div>
<p>If you are on Windows and don’t have the <cite>easy_install</cite> command, you must
install it first. Once you have it installed, run the same commands as
above, but without the <cite>sudo</cite> prefix.</p>
<p>Once you have virtualenv installed, just fire up a shell and create
your own environment. I usually create a project folder and an <cite>env</cite>
folder within:</p>
<div class="highlight-python"><div class="highlight"><pre>$ mkdir myproject
$ cd myproject
$ virtualenv env
New python executable in env/bin/python
Installing setuptools............done.
</pre></div>
</div>
<p>Now, whenever you want to work on a project, you only have to activate
the corresponding environment. On OS X and Linux, do the following:</p>
<div class="highlight-python"><div class="highlight"><pre>$ . env/bin/activate
</pre></div>
</div>
<p>(Note the space between the dot and the script name. The dot means that
this script should run in the context of the current shell. If this command
does not work in your shell, try replacing the dot with <tt class="docutils literal"><span class="pre">source</span></tt>)</p>
<p>If you are a Windows user, the following command is for you:</p>
<div class="highlight-python"><div class="highlight"><pre>$ env\scripts\activate
</pre></div>
</div>
<p>Either way, you should now be using your virtualenv (see how the prompt of
your shell has changed to show the virtualenv).</p>
<p>Now you can just enter the following command to get Werkzeug activated in
your virtualenv:</p>
<div class="highlight-python"><div class="highlight"><pre>$ pip install Werkzeug
</pre></div>
</div>
<p>A few seconds later you are good to go.</p>
</div>
</div>
</div>
</div>
</div>
<div class="sphinxsidebar">
<div class="sphinxsidebarwrapper"><p class="logo"><a href="index.html">
<img class="logo" src="_static/werkzeug.png" alt="Logo"/>
</a></p>
<h3><a href="index.html">Table Of Contents</a></h3>
<ul>
<li><a class="reference internal" href="#">Installation</a><ul>
<li><a class="reference internal" href="#installing-a-released-version">Installing a released version</a><ul>
<li><a class="reference internal" href="#as-a-python-egg-via-easy-install-or-pip">As a Python egg (via easy_install or pip)</a></li>
<li><a class="reference internal" href="#from-the-tarball-release">From the tarball release</a></li>
</ul>
</li>
<li><a class="reference internal" href="#installing-the-development-version">Installing the development version</a></li>
<li><a class="reference internal" href="#virtualenv">virtualenv</a></li>
</ul>
</li>
</ul>
<h3>Related Topics</h3>
<ul>
<li><a href="index.html">Documentation overview</a><ul>
<li>Previous: <a href="index.html" title="previous chapter">Documentation Overview</a></li>
<li>Next: <a href="transition.html" title="next chapter">Transition to Werkzeug 1.0</a></li>
</ul></li>
</ul>
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="_sources/installation.txt"
rel="nofollow">Show Source</a></li>
</ul>
<div id="searchbox" style="display: none">
<h3>Quick search</h3>
<form class="search" action="search.html" method="get">
<input type="text" name="q" />
<input type="submit" value="Go" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
<p class="searchtip" style="font-size: 90%">
Enter search terms or a module, class or function name.
</p>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="footer">
© Copyright 2011, The Werkzeug Team.
Created using <a href="http://sphinx.pocoo.org/">Sphinx</a>.
</div>
</body>
</html>
|