-
Notifications
You must be signed in to change notification settings - Fork 203
Debian Ubuntu Installation Notes (Python virtualenv)
Arushit Mudgal edited this page Apr 15, 2018
·
1 revision
Some users may wish to operate Thug from a Python virtual environment. This can be accomplished easily under Debian testing (at time of writing, Wheezy), which includes a default Python 2.7 environment.
An overview of setup steps follows, based on the setup instructions for Thug:
- Install packages: build-essential subversion git unzip graphviz autoconf libtool mongodb rabbitmq-server python-pip python-dev libboost-python-dev (Apt)
- Install virtualenvwrapper (pip)
- Create python 2.7 virtualenv for Thug
- Install v8/pyv8 in virtualenv (source builds)
- Install libemu from Git (source build) - see below note
- Install pylibemu in virtualenv (source build)
- Install remaining Python libraries via requirements file in virtualenv (pip)
Note: author notes that attempting to build libemu from the latest release tarball failed at configure script under Wheezy with the following error:
$ ./configure
...
checking size of long... configure: error: cannot compute sizeof (long)
Building from a Git checkout succeeds, however.
The following requirements file works for installing Python module dependencies with pip:
# dependencies for thug on Debian Wheezy in virtualenv
beautifulsoup4
html5lib
pefile
chardet
httplib2
boost
cssutils
zope.interface
# pinned to Python 2.x compatible release
pyparsing==1.5.7
pydot
python-magic
pymongo
pika
After setup, Thug executes from the Python virtual environment:
$ ~/venv.d/thug/bin/python ~/devel/thug/thug-master/src/thug.py -V
Thug 0.4.21