2012-05-10 10:26:39 +02:00
# Common
2005-08-18 20:41:26 +02:00
2014-10-13 22:14:49 +02:00
**Note: there is an even easier [installation guide in the documentation! ](http://doc.supybot.aperio.fr/en/latest/use/install.html )**
2014-08-30 15:30:39 +02:00
2012-05-10 10:30:00 +02:00
First things first: Supybot *requires* at least Python 2.6. There
2014-10-13 22:14:49 +02:00
isn't any way to get around it. You can get it from the [Python homepage].
2005-01-19 14:14:38 +01:00
2012-05-10 10:26:39 +02:00
[Python homepage]:http://python.org/
2005-01-19 14:14:38 +01:00
2012-05-10 10:26:39 +02:00
# Recommended Software
2005-01-19 14:14:38 +01:00
2014-03-04 14:51:16 +01:00
The following libraries are not needed for running Limnoria, but enable
2014-10-13 22:14:49 +02:00
extra features you may want (ordered by decreasing estimated usefulness):
2014-03-04 14:51:16 +01:00
[charade] -- enables better encoding handling
[pytz] and [python-dateutil] -- enable additional features of the `Time` plugin
[python-gnupg] -- enables user authentication with GPG
[charade]:https://pypi.python.org/pypi/charade
[pytz]:https://pypi.python.org/pypi/pytz
[python-dateutil]:https://pypi.python.org/pypi/python-dateutil
2014-03-04 14:55:05 +01:00
[python-gnupg]:https://pypi.python.org/pypi/python-gnupg
2012-05-10 10:26:39 +02:00
2014-04-30 18:57:51 +02:00
To install them, run
2014-05-27 05:01:54 +02:00
`pip install -r requirements.txt`
2014-04-30 18:57:51 +02:00
2014-10-13 22:14:49 +02:00
or for a local install (if you don't have or don't want to use root),
2014-04-30 18:57:51 +02:00
2014-06-03 20:01:36 +02:00
`pip install -r requirements.txt --user`
2014-04-30 18:57:51 +02:00
2014-10-13 22:14:49 +02:00
For more information and help on how to use Supybot, check out
2015-02-04 13:50:51 +01:00
the [documentation], especially [GETTING_STARTED] and
[CONFIGURATION].
2012-05-27 11:36:00 +02:00
2015-02-04 13:50:51 +01:00
[documentation]:http://doc.supybot.aperio.fr/en/latest/use/index.html
[GETTING_STARTED]:http://doc.supybot.aperio.fr/en/latest/use/getting_started.html
[CONFIGURATION]:http://doc.supybot.aperio.fr/en/latest/use/configuration.html
2005-01-19 14:14:38 +01:00
2012-05-10 10:30:00 +02:00
So what do you do? That depends on which operating system you're
2014-10-13 22:14:49 +02:00
running. We've split this document up to address the different installation
2005-08-18 20:41:26 +02:00
methods, so find the section for your operating system and continue
from there.
2005-01-19 14:14:38 +01:00
2012-05-10 10:26:39 +02:00
# UNIX/Linux/BSD
2005-01-19 14:14:38 +01:00
2012-05-10 10:30:00 +02:00
If you're installing Python using your distributor's packages, you may
2014-02-21 16:38:40 +01:00
need a python-dev or python3-dev package installed, too. If you don't have
2014-10-13 22:14:49 +02:00
a `/usr/lib/python2.x/distutils` directory or
`/usr/lib/python2.x/config/Makefile` ; or with Python 3
`/usr/lib/python3.x/distutils` or `/usr/lib/python3.x/config/Makefile` (assuming `/usr/lib/python2.x` or `/usr/lib/python3.x` is where your Python
2014-02-21 16:38:40 +01:00
libs are installed), then you will need a python-dev or python3-dev package.
2005-01-19 14:14:38 +01:00
2014-05-22 13:46:09 +02:00
## git
2012-05-10 10:26:39 +02:00
First start by git cloning Limnoria and moving to the cloned repository.
```
2014-06-04 14:36:25 +02:00
git clone https://github.com/ProgVal/Limnoria.git
2012-05-10 10:26:39 +02:00
cd Limnoria
```
2014-10-13 22:14:49 +02:00
The rest depends on whether you have root access and want a global or local install.
2012-05-10 10:26:39 +02:00
2014-05-22 13:46:09 +02:00
### Global install
2012-05-10 10:26:39 +02:00
Run
```
python setup.py install
```
2014-05-27 05:01:54 +02:00
`python` can be replaced with `python2` (if your distribution
2014-10-13 22:14:49 +02:00
uses Python 3 by default) or `python3` if you want to use the Python 3
version of the bot.
2014-02-21 16:38:40 +01:00
2012-05-10 10:26:39 +02:00
Now you have several new programs installed where Python scripts are normally
2014-10-13 22:43:10 +02:00
installed on your system (`/usr/bin` or `/usr/local/bin` are common on
2014-10-13 22:14:49 +02:00
UNIX systems). The two that might be of particular interest to you as a
new user are 'supybot' and 'supybot-wizard'. The former, 'supybot', is
2005-08-18 20:41:26 +02:00
the script to run an actual bot; the latter, 'supybot-wizard', is an
in-depth wizard that provides a nice user interface for creating a
registry file for your bot.
2014-05-22 13:46:09 +02:00
### Local install
2005-01-19 14:14:38 +01:00
2012-05-10 10:26:39 +02:00
Run
2005-01-19 14:14:38 +01:00
2012-05-10 10:26:39 +02:00
```
python setup.py install --user
```
2014-05-27 05:01:54 +02:00
`python` can be replaced with `python2` (if your distribution
2014-10-13 22:14:49 +02:00
uses Python 3 by default) or `python3` if you want to use the Python 3
2014-05-27 05:01:54 +02:00
version.
2014-02-21 16:38:40 +01:00
2014-10-13 22:14:49 +02:00
and you will have new programs installed in `~/.local/bin` . The two that might be of particular interest to you as a
new user are 'supybot' and 'supybot-wizard'. The former, 'supybot', is
2012-05-10 10:26:39 +02:00
the script to run an actual bot; the latter, 'supybot-wizard', is an
in-depth wizard that provides a nice user interface for creating a
registry file for your bot.
2014-10-13 22:14:49 +02:00
By default you must run the bot with full path to the binary unless you specify a $PATH.
2012-05-10 10:26:39 +02:00
2014-10-13 22:14:49 +02:00
Run the following command to fix your PATH. We assume that you use bash
(and if you don't, you probably already know how to do this with the shell you are using).
2012-05-10 10:26:39 +02:00
```
2014-05-01 11:17:28 +02:00
echo 'PATH="$HOME/.local/bin:$PATH"' >> ~/.bashrc
2014-05-01 11:12:27 +02:00
source ~/.bashrc
2012-05-10 10:26:39 +02:00
```
2014-05-22 13:46:09 +02:00
## Pip
2014-10-13 22:43:10 +02:00
To install with pip, run:
2014-05-22 13:46:09 +02:00
```
2014-06-18 20:24:50 +02:00
sudo pip install -r https://raw.githubusercontent.com/ProgVal/Limnoria/master/requirements.txt
2014-06-18 20:31:19 +02:00
sudo pip install git+https://github.com/ProgVal/Limnoria.git@master
2014-05-22 13:46:09 +02:00
```
2014-10-13 22:14:49 +02:00
or for a local install:
2014-06-03 20:01:36 +02:00
```
2014-06-18 20:24:50 +02:00
pip install -r https://raw.githubusercontent.com/ProgVal/Limnoria/master/requirements.txt --user
2014-06-18 20:31:19 +02:00
pip install git+https://github.com/ProgVal/Limnoria.git@master --user
2014-06-03 20:01:36 +02:00
```
2014-05-22 13:46:09 +02:00
If you wish to use Python 3 or 2 instead of default of your distribution
2014-10-13 22:14:49 +02:00
run `pipX` where X is either 2 or 3 (`pip2` or `pip3` ) instead of `pip` .
2014-05-22 13:46:09 +02:00
2014-10-13 22:14:49 +02:00
If pip gives an error immediately instead of doing anything and you have git installed, try upgrading pip with `sudo pip install pip --upgrade` (or locally, `pip install pip --upgrade --user` ).
2014-08-30 15:30:39 +02:00
2014-05-22 13:46:09 +02:00
### Upgrading
#### git
2012-05-10 10:51:59 +02:00
To upgrade, return to the cloned Limnoria repository and run:
```
git pull
```
2014-10-13 22:14:49 +02:00
and then install Limnoria normally. "python setup.py install" doesn't affect config files of the bot in any way.
2012-05-10 10:51:59 +02:00
If you don't have the cloned Limnoria repository, clone it again using the installation instructions.
2014-08-30 15:30:39 +02:00
### Pip
2014-05-22 13:46:09 +02:00
2014-06-18 20:31:19 +02:00
Run the first install command again, but add `--upgrade` to the
end. Then run the second install command.
2014-05-22 13:46:09 +02:00
2014-02-21 16:38:40 +01:00
## Upgrading to Python 3
2015-02-04 13:55:22 +01:00
Upgrading to Python 3 happens the same way, but if you want to move from 2
to 3 or 3 to 2, you must remove the `build/` directory and the executable
`supybot*` files first. `The build/` directory is in same directory as
this file and the `supybot*` executables are usually in `/usr/local/bin`
or `~/.local/bin` .
2014-02-21 16:38:40 +01:00
```
rm -rf build/
2014-02-21 17:24:38 +01:00
rm /usr/local/bin/supybot*
rm ~/.local/bin/supybot*
2014-02-21 16:38:40 +01:00
```