Installing the required packages
You can install pSysmon in you main python environment or you can create a well defined python environment using the virtualenvwrapper. How to setup the virtual environment for pSysmon is described in Creating a pSysmon development environment with virtualenv. To install the required python packages, you can either install all needed packages from the PyPi repository using pip or you can use the prepared packages of your Linux distribution. I recommend using pip, which ensures that you install the most recent version of the package.
Installing required packages using pip
A list of the required packages to run pSysmon is given in the Requirements section.
A detailed description how to install the dependencies using pip is given in Installing the packages required by pSysmon.
Installing required packages using the Linux package management (Ubuntu/Debian)
sudo apt-get update sudo apt-get install python sudo apt-get install python-dev sudo apt-get install python-pip sudo apt-get install python-numpy sudo apt-get install python-scipy sudo apt-get install python-matplotlib sudo apt-get install python-mpltoolkits.basemap sudo apt-get install python-lxml sudo apt-get install python-mysqldb sudo apt-get install python-sqlalchemy sudo apt-get install python-imaging sudo apt-get install python-cairo sudo apt-get install python-wxversion sudo apt-get install mysql-server
Additionally the obspy package has to be installed. The obspy package can't be found in the standard repository of a linux distribution, but the obspy development team provides an apt repository. Follow the instructions at Installation on Linux via Apt Repository to install the latest obspy release from the repository.
Alternatively you can install obspy using pip:
pip install obspy
Install pSysmon using pip
If you have pip installed at your system, you can use it to install pSysmon directly from the tarball of your downloaded pSysmon release.
pip install PSYSMON_TARBALL_FILENAME
Installing pSysmon in editable (development) mode using pip
pSysmon uses some code which needs to be compiled, therefore the setup.py script should be used to build all needed libraries. Just setting the PYTHON_PATH to the psysmon directory is not sufficient.
To install pSysmon in the vitural environment in a way that it still can be updated using git and edited one should use the
–editable (-e) option of the
pip install command.
The editable option requires a path to the folder which contains the psysmon setup.py file:
pip install -e PATH_TO_FOLDER_CONTAINING_SETUP.PY.
(psysmonDev)user@computer ~$ pip install -e psysmon
This will create a
psysmon.egg-link file in the folder
$VIRTUAL_ENV/lib/python2.7/site-packages and an entry to the psysmon path in the file
Install pSysmon using setup.py
If you don't want to use pip, you can extract the downloaded pSysmon source tarball and run the setup.py script:
python setup.py install
Depending on your configuration this will install psysmon in your python site-packages or the dist-packages folder. It depends on your linux distribution where the site-packages or dist-packages folder is located (e.g. Mint Linux: /usr/local/lib/python2.7/dist-packages).
If you are using a virtual environment as described in Setting up a virtual environment, than the psysmon files are installed in VIRTUALENV_DIR/lib/python2.7/site-packages.