2011-06-27 11:19:15 +02:00
.. highlight :: bash
.. _use-install:
***** ***** ***** *** *
Installing Limnoria
***** ***** ***** *** *
2012-06-28 17:58:13 +02:00
This is the "easy to follow" guide to installing Limnoria. The installation
2011-06-27 11:19:15 +02:00
documentation provided with the supybot distribution is really quite good
already, but since people keep coming to IRC, asking a repeating pattern of
questions, we thought it would be a good idea to expand it a bit to make it
a little more of a "foolproof guide".
2012-06-28 17:58:13 +02:00
.. note ::
Limnoria is a modified version of Supybot.
2016-08-07 15:55:26 +02:00
Using your OS' package manager
***** ***** ***** ***** ***** *****
On Debian (8.0 and above)
=========================
.. code-block :: bash
sudo aptitude install limnoria
If you have Debian 8.0 (Jessie), this command won't work unless you
have `Backports`_ repositories configured.
.. _Backports: https://wiki.debian.org/Backports
On Ubuntu (16.10 and above)
===========================
.. code-block :: bash
sudo apt-get install limnoria
On Fedora (23 and above)
========================
.. code-block :: bash
sudo dnf install limnoria
On CentOS and Red Hat Enterprise Linux
======================================
You have to first add the EPEL repository (`EL7`_ , `EL6`_ , `EL5`_ ) before being able to install the package on CentOS / RHEL. Once you have, you can run the following command to install Limnoria:
.. code-block :: bash
sudo yum install limnoria`
.. _EL7: https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
.. _EL6: https://dl.fedoraproject.org/pub/epel/epel-release-latest-6.noarch.rpm
.. _EL5: https://dl.fedoraproject.org/pub/epel/epel-release-latest-5.noarch.rpm
On FreeBSD
==========
Port
----
.. code-block :: bash
cd /usr/ports/irc/py-limnoria && sudo PYTHON_VERSION=3.5 make install clean
You can omit `` PYTHON_VERSION=3.5 `` if you want to build for Python 2.7,
or if you have `` DEFAULT_VERSIONS=python=3.5 `` in `/etc/make.conf` .
Package
-------
.. code-block :: bash
sudo pkg install py27-limnoria
Manual install
***** ***** *** *
If your OS is not listed above, or if you want to do a manual install:
2011-06-27 11:19:15 +02:00
Dependencies
============
2016-02-22 19:50:26 +01:00
The only mandatory dependency is `Python`_ 2.6 or greater. However, it is
highly recommended you use Python 3.4 or greater.
2011-06-27 11:19:15 +02:00
2016-02-22 19:50:26 +01:00
You may also install chardet and feedparser, which are used by Limnoria if
they are available.
The remaining of this guide will assume you have Python 3. If you don't,
replace `python3` by `python` in the given commands
2011-06-27 11:19:15 +02:00
.. _Python: http://www.python.org/
Installation: UNIX/Linux/BSD
============================
Install Python
--------------
Python will usually come by installed by default in your distribution. If not,
grab the appropriate packages from the distribution's repository.
If you're installing Python using your distribution's packages, you may need a
''python-dev'' or ''python-devel'' package installed, too. To see if this is
the case, open up a terminal, start python, and run:
.. code-block :: python
import distutils
2016-02-22 19:50:26 +01:00
If it works, you're good to go. Otherwise, install the `python3-dev` or
`python3-devel` package and try again.
2011-06-27 11:19:15 +02:00
You may also install "manually" by downloading the source archive from
http://python.org, and compiling it. That is outside the scope of this guide,
however.
2012-06-28 17:58:13 +02:00
Install Limnoria
----------------
2011-06-27 11:19:15 +02:00
2014-06-27 19:23:39 +02:00
In the next section of this guide we will use `pip`_ , which is a generic
2016-02-22 19:50:26 +01:00
way of installing Python software.
2014-06-27 19:23:39 +02:00
2016-02-22 20:07:04 +01:00
There are some :ref: `alternative install methods <alternative-install>`
at the bottom of this guide, if you don't want to use `pip` .
2014-06-27 19:25:04 +02:00
2014-06-27 17:23:55 +02:00
.. _pip: http://pip.readthedocs.org/en/latest/installing.html#install-pip
2016-01-26 08:46:36 +01:00
Global installation (with root access)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
If you do not have root access, skip this section.
2014-06-27 17:23:55 +02:00
2014-07-30 07:54:16 +02:00
If you are logged in as root, you can remove `` sudo `` from the install
commands.
2014-06-27 17:23:55 +02:00
2014-08-29 19:09:29 +02:00
*In case you want to use the testing branch which might be more up-to
date BUT LESS TESTED, replace `` master `` with `` testing `` in the commands.*
2014-06-27 19:02:15 +02:00
2016-01-06 09:22:14 +01:00
First we install Limnoria's optional dependencies (you can skip this
step, but some features won't be available)::
2014-06-27 17:23:55 +02:00
2016-02-22 19:50:26 +01:00
sudo python3 -m pip install -r https://raw.githubusercontent.com/ProgVal/Limnoria/master/requirements.txt --upgrade
2014-06-27 17:23:55 +02:00
2014-06-27 19:19:04 +02:00
And then Limnoria itself::
2014-06-27 17:23:55 +02:00
2016-02-22 19:50:26 +01:00
sudo python3 -m pip install limnoria --upgrade
2014-06-27 17:23:55 +02:00
2016-02-22 19:50:26 +01:00
If you have an error saying `No module named pip` , install `pip` using
your package manager (the package is usually named `python3-pip` ).
2014-08-21 19:10:07 +02:00
2016-01-26 08:46:36 +01:00
Local installation (without root access)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
If you have followed the previous section, skip this one.
2014-06-27 17:23:55 +02:00
Simply add `` --user `` to the end of both commands. First we install
2016-01-06 09:22:14 +01:00
requirements (you can skip it, but some features won't be available)
and then Limnoria itself.::
2014-06-27 17:23:55 +02:00
2016-03-20 12:01:38 +01:00
python3 -m pip install -r https://raw.githubusercontent.com/ProgVal/Limnoria/master/requirements.txt --user --upgrade
python3 -m pip install limnoria --user --upgrade
2014-06-27 17:23:55 +02:00
2014-06-27 18:41:45 +02:00
You might need to add $HOME/.local/bin to your PATH.::
2014-06-27 17:23:55 +02:00
echo 'PATH="$HOME/.local/bin:$PATH"' >> ~/.$(echo $SHELL|cut -d/ -f3)rc
source ~/.$(echo $SHELL|cut -d/ -f3)rc
2016-02-22 19:50:26 +01:00
If you have an error saying `No module named pip` , install `pip` using this
guide: https://pip.pypa.io/en/stable/installing/
2014-08-21 19:10:07 +02:00
2011-06-27 11:19:15 +02:00
Configure Supybot
-----------------
We are now ready to configure Supybot. Supybot creates quite a few auxiliary
files/directories to store its runtime data. It is thus recommended to create
an empty directory from which you'll be running supybot, to keep all the data
in a nice dedicated location. For example, you may create a 'runbot' directory
inside your home directory.
Now you can cd to your 'runbot' directory, and from within it run
`` supybot-wizard `` , which will walk you through a series of questions to
generate the bot config file.
One thing to make sure to do in the wizard, to make your life easier down the
line, is to select **y** for the *Would you like to add an owner user for your
bot?* question, and actually create the owner user. Remember that password, so
that you can later ''identify'' with the bot on IRC and administer it.
Once you generate the config file, which will be named `` yourbotnick.conf ``
(where "yourbotnick" is the nick you have chosen for your bot in the wizard),
it will be placed in your 'runbot' directory. (As long as you leave the default
answer to the ''Where would you like to create these directories?'' question.)
Now to start the bot, run, still from within the 'runbot' directory::
supybot yourbotnick.conf
And watch the magic!
For a tutorial on using and managing the bot from here on, see the `Supybook`_ .
.. _Supybook: http://supybook.fealdia.org/
Installation: OS X
==================
The steps are essentially the same as those of the previous section, except
there are no repositories. Grab the latest python installer for OS X from
http://python.org, and follow the rest of the steps.
Installation: Windows
=====================
2011-06-28 08:11:32 +02:00
.. highlight :: bat
2011-06-27 11:19:15 +02:00
Install Python
--------------
2014-11-30 12:54:11 +01:00
Download the latest **Python 3** installer from https://www.python.org,
2016-01-26 09:23:02 +01:00
3.5.1, as of 2016-01-26) and run it to install Python.
2011-06-27 11:19:15 +02:00
2014-11-30 12:54:11 +01:00
Installing Python is mostly clicking next, but in the next screen remember
the destination directory where you installed Python. These instructions
2016-01-26 09:23:02 +01:00
refer to it as `` C:\Python35\ `` which is the current name on 2016-01-26.
2011-06-27 11:19:15 +02:00
2014-11-30 12:54:11 +01:00
Then you are asked to customize your installation. Click the drive on left
side of "Python" text and select "Entire feature will be installed on
local hard drive".
2011-06-27 11:19:15 +02:00
2014-11-30 12:54:11 +01:00
Now Python installs itself which may take several minutes.
2011-06-27 11:19:15 +02:00
2014-11-30 12:54:11 +01:00
Python should be now installed and you can check that the "python" command
points to correct python. Open `` cmd.exe `` (press the Windows button on
your keyboard and type "cmd.exe") and run `` where python ``
2016-01-26 09:23:02 +01:00
and the toppernmost entry should be `` C:\Python35\python.exe `` .
2011-06-27 11:19:15 +02:00
2014-11-30 12:54:11 +01:00
Install git
-----------
2011-06-27 11:19:15 +02:00
2014-11-30 12:54:11 +01:00
In order to install the latest Limnoria from the git repository, you need
git in your %PATH%. You can get it from http://git-scm.com/.
2011-06-27 11:19:15 +02:00
2014-11-30 12:54:11 +01:00
In the "Adjusting your PATH environment", select the last option, "Use Git
and optional Unix tools from the Windows Command Prompt" or you will have
issues in the next step.
2011-06-27 11:19:15 +02:00
2014-11-30 12:54:11 +01:00
Install Supybot
---------------
2011-06-27 11:19:15 +02:00
2014-11-30 12:54:11 +01:00
Now we are ready to install Limnoria and it's requirements. Open
`` cmd.exe `` as **Administrator** (right click it in the previous place)
and run::
2011-06-27 11:19:15 +02:00
2016-02-22 19:50:26 +01:00
python3 -m pip install -r https://raw.githubusercontent.com/ProgVal/Limnoria/master/requirements.txt --upgrade
python3 -m pip install limnoria --upgrade
2011-06-27 11:19:15 +02:00
2014-11-30 12:54:11 +01:00
We are now ready to configure Supybot. Supybot creates quite a few
auxiliary files/directories to store its runtime data. It is thus
recommended to create an empty directory from which you'll be running
supybot, to keep all the data in a nice dedicated location.
For example, you may create a `` C:\Users\<username>\runbot `` for this
purpose.
2011-06-27 11:19:15 +02:00
2014-11-30 12:54:11 +01:00
Now you open cmd.exe as **normal user** , and create and cd into your runbot
directory::
2011-06-27 11:19:15 +02:00
2014-11-30 12:54:11 +01:00
mkdir runbot
cd runbot
2011-06-27 11:19:15 +02:00
and from within it run `` supybot-wizard `` ::
2016-02-22 19:50:26 +01:00
python3 C:\Python35\Scripts\supybot-wizard
2011-06-27 11:19:15 +02:00
2014-11-30 12:54:11 +01:00
which will walk you through a series of questions to generate the bot
config file.
2011-06-27 11:19:15 +02:00
2014-11-30 12:54:11 +01:00
One thing to make sure to do in the wizard, to make your life easier down
the line, is to select *y* for the *Would you like to add an owner user
for your bot?* question, and actually create the owner user. Remember that
2011-06-27 11:19:15 +02:00
password, so that you can later ''identify'' with the bot on IRC and
administer it.
Once you generate the config file, which will be named `` yourbotnick.conf ``
2014-11-30 12:54:11 +01:00
(where `` yourbotnick `` is the nick you have chosen for your bot in the
wizard), it will be placed in your `` runbot `` directory. (As long as you
leave the default answer to the *Where would you like to create these
directories?* question.)
2011-06-27 11:19:15 +02:00
2014-11-30 12:54:11 +01:00
Now to start the bot, run, still from within the
`` C:\users\<username>\runbot `` directory::
2011-06-27 11:19:15 +02:00
2016-02-22 19:50:26 +01:00
python3 C:\Python35\Scripts\supybot yourbotnick.conf
2011-06-27 11:19:15 +02:00
And watch the magic!
2014-11-30 12:54:11 +01:00
This guide has been mainly written by nanotube (Daniel Folkinshteyn), and
is licensed under the Creative Commons Attribution ShareAlike 3.0 Unported
license and/or the GNU Free Documentation License v 1.3 or later.
2011-06-27 11:19:15 +02:00
.. _Supybook: http://supybook.fealdia.org/
2016-02-22 20:07:04 +01:00
.. _alternative-install:
Alternative install methods
===========================
If you know what you are doing and you don't want to use pip, you
can use one of these methods:
* Download a .deb or .rpm package at `ProgVal's build repo`_ .
* Use `git`_ to clone the `Limnoria repository`_ and follow the
instructions in `Limnoria's README.md`_ .
* Click the "Download ZIP" button at the `Limnoria repository`_ . Then,
extract the zipball to some temporary directory, and `` cd `` into the
`Limnoria-master` directory which contains the extracted code.
.. _ProgVal's build repo: https://builds.progval.net/limnoria/
.. _Limnoria repository: https://github.com/ProgVal/Limnoria
.. _git: http://git-scm.com/
.. _Limnoria's README.md: https://github.com/ProgVal/Limnoria/blob/testing/README.md#installing-from-cloned-repo