Project

General

Profile

Installation » History » Version 6

Gerjan Klinkhamer, 2014-03-21 15:49

1 3 Elmer de Looff
µWeb is developed on, and intended primarily to run on Debian GNU-Linux. As such, installation instructions will focus on getting µWeb running on that family of platforms
2 3 Elmer de Looff
3 1 Elmer de Looff
h1. Installation
4 1 Elmer de Looff
5 4 Elmer de Looff
The easiest way to install µWeb is to get it from the Python Package Index (https://pypi.python.org/pypi/uWeb). For most Linux there is a commandline application @pip@ which facilitaties easy installation of packages from the Package Index. To begin, install @pip@ on Debian:
6 1 Elmer de Looff
7 3 Elmer de Looff
<pre><code class="bash">
8 3 Elmer de Looff
sudo apt-get install python-pip
9 3 Elmer de Looff
</code></pre>
10 1 Elmer de Looff
11 3 Elmer de Looff
After this, µWeb can be installed with the following command:
12 1 Elmer de Looff
13 1 Elmer de Looff
<pre><code class="bash">
14 3 Elmer de Looff
sudo pip install uweb
15 1 Elmer de Looff
</code></pre>
16 1 Elmer de Looff
17 3 Elmer de Looff
This pulls in all the necessary requirements automatically and installs and configures them for you.
18 1 Elmer de Looff
19 6 Gerjan Klinkhamer
h3. MySQL support
20 1 Elmer de Looff
21 3 Elmer de Looff
µWeb requires a MySQL connector binary, which @pip@ will attempt to compile from source for you. If this is undesired (because it requires development headers for MySQL and Python, and some other packages), this MySQL requirement can be fulfilled by installing that package separately:
22 3 Elmer de Looff
23 1 Elmer de Looff
<pre><code class="bash">
24 3 Elmer de Looff
sudo apt-get install python-mysqldb
25 1 Elmer de Looff
</code></pre>
26 5 Elmer de Looff
27 5 Elmer de Looff
h1. Upgrading
28 5 Elmer de Looff
29 5 Elmer de Looff
The easiest way to upgrade µWeb to the latest release is to use @pip@ again:
30 5 Elmer de Looff
31 5 Elmer de Looff
<pre><code class="bash">
32 5 Elmer de Looff
sudo pip install --upgrade uweb
33 5 Elmer de Looff
</code></pre>
34 5 Elmer de Looff
35 5 Elmer de Looff
This will also automatically update all dependencies of µWeb if they have changed. If you run into missing dependencies for the MySQL connector (as explained in the section above, _MySQL support_), the easiest way to perform the upgrade is to remove and reinstall in one go:
36 5 Elmer de Looff
37 5 Elmer de Looff
<pre><code class="bash">
38 1 Elmer de Looff
sudo pip uninstall uweb && sudo pip install uweb
39 6 Gerjan Klinkhamer
</code></pre>
40 6 Gerjan Klinkhamer
41 6 Gerjan Klinkhamer
h1. Installation on OS X 10.9
42 6 Gerjan Klinkhamer
43 6 Gerjan Klinkhamer
Install Homebrew (http://brew.sh) or update:
44 6 Gerjan Klinkhamer
45 6 Gerjan Klinkhamer
<pre><code class="bash">
46 6 Gerjan Klinkhamer
brew update
47 6 Gerjan Klinkhamer
</code></pre>
48 6 Gerjan Klinkhamer
49 6 Gerjan Klinkhamer
Run
50 6 Gerjan Klinkhamer
51 6 Gerjan Klinkhamer
<pre><code class="bash">
52 6 Gerjan Klinkhamer
brew doctor 
53 6 Gerjan Klinkhamer
</code></pre>
54 6 Gerjan Klinkhamer
55 6 Gerjan Klinkhamer
and fix any issues.
56 6 Gerjan Klinkhamer
57 6 Gerjan Klinkhamer
Install pip:
58 6 Gerjan Klinkhamer
59 6 Gerjan Klinkhamer
<pre><code class="bash">
60 6 Gerjan Klinkhamer
sudo easy_install pip
61 6 Gerjan Klinkhamer
</code></pre>
62 6 Gerjan Klinkhamer
63 6 Gerjan Klinkhamer
Install mySQL:
64 6 Gerjan Klinkhamer
65 6 Gerjan Klinkhamer
<pre><code class="bash">
66 6 Gerjan Klinkhamer
brew install mysql
67 6 Gerjan Klinkhamer
</code></pre>
68 6 Gerjan Klinkhamer
69 6 Gerjan Klinkhamer
Set flags prior to installing uWeb to prevent clang error:
70 6 Gerjan Klinkhamer
71 6 Gerjan Klinkhamer
<pre><code class="bash">
72 6 Gerjan Klinkhamer
export CFLAGS=-Qunused-arguments
73 6 Gerjan Klinkhamer
</code></pre>
74 6 Gerjan Klinkhamer
75 6 Gerjan Klinkhamer
<pre><code class="bash">
76 6 Gerjan Klinkhamer
export CPPFLAGS=-Qunused-arguments
77 6 Gerjan Klinkhamer
</code></pre>
78 6 Gerjan Klinkhamer
79 6 Gerjan Klinkhamer
See this page for further info: http://stackoverflow.com/questions/22313407/clang-error-unknown-argument-mno-fused-madd-python-package-installation-fa
80 6 Gerjan Klinkhamer
81 6 Gerjan Klinkhamer
Now install uWeb:
82 6 Gerjan Klinkhamer
83 6 Gerjan Klinkhamer
<pre><code class="bash">
84 6 Gerjan Klinkhamer
sudo -E pip install uweb
85 5 Elmer de Looff
</code></pre>