Warning
This documentation is still a work in progress. If you have any issues or questions, please ask on the maec-discussion mailing list or file a bug in our issue tracker.
The installation of python-maec can be accomplished through a few different workflows.
$ pip install maec
You might also want to consider using a virtualenv. Please refer to the pip installation instructions for details regarding the installation of pip.
The python-maec library relies on some non-standard Python libraries for the processing of MAEC content. Revisions of python-maec may depend on particular versions of dependencies to function correctly. These versions are detailed within the distutils setup.py installation script.
The following libraries are required to use python-maec:
Each of these can be installed with pip or by manually downloading packages from PyPI. On Windows, you will probably have the most luck using pre-compiled binaries for lxml. On Ubuntu (12.04 or 14.04), you should make sure the following packages are installed before attempting to compile lxml from source:
Warning
Users have encountered errors with versions of libxml2 (a dependency of lxml) prior to version 2.9.1. The default version of libxml2 provided on Ubuntu 12.04 is currently 2.7.8. Users are encouraged to upgrade libxml2 manually if they have any issues. Ubuntu 14.04 provides libxml2 version 2.9.1.
If you are unable to use pip, you can also install python-maec with setuptools. If you don’t already have setuptools installed, please install it before continuing.
$ tar -zxf MAEC-4.1.0.9.tar.gz $ ls MAEC-4.1.0.9 MAEC-4.1.0.9.tar.gz
OR
$ unzip MAEC-4.1.0.9.zip $ ls MAEC-4.1.0.9 MAEC-4.1.0.9.zip
$ cd MAEC-4.1.0.9 $ python setup.py install
$ python
Python 2.7.6 (default, Mar 22 2014, 22:59:56)
[GCC 4.8.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import MAEC
>>>
If you don’t see an ImportError, the installation was successful.
If you’re new to installing Python packages, you can learn more at the Python Packaging User Guide, specifically the Installing Python Packages section.