The installation of maec-to-stix can be accomplished through a few different workflows.
$ pip install maec-to-stix [--pre] [--upgrade]
maec-to-stix is currently in alpha status. To install an alpha or beta release via pip, you must specify the version number or use --pre.
$ pip install maec-to-stix --pre
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.
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.
- 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.
- 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.
- 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
$ 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
- Run the installation script.
$ cd maec-to-stix-1.0.0-alpha1 $ python setup.py install
- 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.