Installing Moya

Moya is distributed as a Python module.

Requirements

Moya supports Python 2.7, and Python 3.3+. Support for Python 2.7 will continue for its lifespan – likely many years yet.

Linux

Moya requires lxml. Probably the simplest way to install lxml is via your package manager:

sudo apt-get install python-lxml

If your package manager doesn't offer lxml, you will need to install libxml2 and libxslt:

sudo apt-get install libxml2-dev libxslt-dev python-dev

See the official documentation on installing lxml if you have any problems.

You can then install Moya with the following:

sudo pip install moya

Windows

You can stall Moya on Windows with the following:

pip install moya

If you get errors about lxml not installing, you may need to install lxml separately. Download a binary from http://www.lfd.uci.edu/~gohlke/pythonlibs/#lxml and install with pip. Then run install Moya again (with pip).

OSX

If you have a Python environment set up, then the following command will install Moya:

pip install moya

If you don't have Python + Pip set up, you can install them via Homebrew. Follow the official instructions to install Homebrew. Then run the following to install Python + Pip + Moya:

brew install python
pip install pip -U
pip install moya

Installing from Source

If you want the cutting edge code, you can install the latest from GitHub. The Moya repos also contains example projects that you may want to try out.

To get the source, clone the Moya GitHub repository, then run the following:

$ sudo python setup.py install

Command Line Application

After installation you should have the moya command available on the command line. Enter the following in a terminal to confirm installation was successful and display the version number:

$ moya -v

The command app has extensive help; run the following to get help information on the available sub-commands:

$ moya -h

You can get help on a sub-command by typing moya followed by the name of the sub-command and -h. Here's an example:

$ moya runserver -h