Installation

The installation of maec-to-stix can be accomplished through a few different workflows.

Dependencies

The maec-to-stix package relies on some non-standard Python libraries for the processing of XML content. Revisions of maec-to-stix 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 maec-to-stix:

  • python-maec - A python library for parsing and creating MAEC content.
  • python-stix - A python library for parsing and creating STIX content.

Each of these can be installed with pip or by manually downloading packages from PyPI.

Manual Installation

If you are unable to use pip, you can also install maec-to-stix with setuptools. If you don’t already have setuptools installed, please install it before continuing.

  1. Download and install the dependencies above. Although setuptools will generally install dependencies automatically, installing the dependencies manually beforehand helps distinguish errors in dependency installation from errors in maec-to-stix installation. Make sure you check to ensure the versions you install are compatible with the version of maec-to-stix you plan to install.
  2. Download the desired version of maec-to-stix from PyPI or the GitHub releases page. The steps below assume you are using the 1.0.0-alpha1 release.
  3. Extract the downloaded file. This will leave you with a directory named maec-to-stix-1.0.0-alpha1.
$ tar -zxf maec-to-stix-1.0.0-alpha1.tar.gz
$ ls
maec-to-stix-1.0.0-alpha1 maec-to-stix-1.0.0-alpha1.tar.gz

OR

$ unzip maec-to-stix-1.0.0-alpha1.zip
$ ls
maec-to-stix-1.0.0-alpha1 maec-to-stix-1.0.0-alpha1.zip
  1. Run the installation script.
$ cd maec-to-stix-1.0.0-alpha1
$ python setup.py install
  1. Test the installation.
$ python
Python 2.7.8 (default, Mar 22 2015, 22:59:56)
[GCC 4.8.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import maec_to_stix
>>> print maec_to_stix.__version__
1.0.0-alpha1

If you don’t see an ImportError, the installation was successful.

Further Information

If you’re new to installing Python packages, you can learn more at the Python Packaging User Guide, specifically the Installing Python Packages section.