Building and Running Sasview on Linux

There are currently no packaged releases of SasView for Linux. Thus some familiarity with linux command line tools is required. The following instructions concern Ubuntu 16.04 but should provide sufficient guidelines for any linux distribution. These instructions obviously reference the package manger on Debian based system (apt), so you should replace such commands with the correct ones for your distro.

Download source code for SasView and SasModels

  • To obtain the source code you need to have git running. if you haven't already got it, it can be obtained from Ubuntu repository
    sudo apt-get install git
    
  • The easy way to download the SasView and SasModels code is by simply cloning a git repository
    mkdir sasview-code
    cd sasview-code
    git clone https://github.com/SasView/sasview
    git clone https://github.com/SasView/sasmodels
    
  • This will create a sasview-code folder in your current directory and then check out the latest version of the sasview and sasmodels code. However, we need to use a stable version and not the developer version. So we need to then do
    cd sasview
    git checkout v4.1.2
    cd ../sasmodels
    git checkout v0.96
    
  • Each of SasView and SasModels should now be checked out at the current release version.

Install OpenCL Drivers

  • Currently SasView/sasmodels requires OpenCL drivers on Linux. You can install the relevant ones for your graphics card or the generic Intel ones for your CPU. Possible sources are:

Install dependencies using apt-get

  • Scientific python packages (numpy, scipy) together with matplotlib, pylint and wxgtk3.0 can be installed by running
    sudo apt-get install python-numpy python-scipy python-matplotlib pylint python-wxgtk3.0 python-pyopencl sphinx-common
    

Install pip

  • The remaining dependencies can be installed using pip, which if it is not already installed, can be obtained by running the following:
    wget https://bootstrap.pypa.io/get-pip.py
    sudo python get-pip.py
    

Install dependencies using pip

  • Once pip is obtained the remaining dependencies are installed by:
    sudo pip install unittest-xml-reporting
    sudo pip install bumps
    sudo pip install periodictable
    

Run SasView

  • Then one can navigate to a SasView source directory (most likely "cd sasview") and simply run
    python run.py
    
  • This should then build SasModels as needed and run SasView.

Compile and install SasView

  • Then one can navigate to a SasView source directory (most likely "cd sasview") and simply run
    python setup.py build      # will build the package underneath 'build/'
    python setup.py install    # will install the package
    
  • A similar process should be used for SasModels
  • sudo commnand might be required for a global installation

Building the Help Docs

The process for building the help docs has been steadily evolving. The latest instructions might be found here

Last modified 7 years ago Last modified on Sep 18, 2017 4:26:26 AM