Warning
This documentation is still a work in progress. If you have any issues or questions, please ask on the cybox-discussion mailing list or file a bug in our issue tracker.
Use pip:
$ pip install cybox
You might also want to consider using a virtualenv.
The python-cybox library is developed on Python 2.7 and tested against both Python 2.6 and 2.7. Besides the Python Standard Library, python-cybox relies on the following Python libraries:
Note
importlib is built into Python 2.7, and is available on PyPI for Python 2.6.
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:
If you are unable to use pip, you can also install python-cybox with setuptools. If you don’t already have setuptools installed, please install it before continuing.
$ tar -zxf cybox-2.1.0.10.tar.gz $ ls cybox-2.1.0.10 cybox-2.1.0.10.tar.gz
OR
$ unzip cybox-2.1.0.10.zip $ ls cybox-2.1.0.10 cybox-2.1.0.10.zip
$ cd cybox-2.1.0.10 $ 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 cybox
>>>
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.