Installation

Requirements

The mcasopt package is made available in a public repository on Bitbucket. To download and install it, you need the following software:

Create a Python virtual environment

It’s best to install mcasopt in a Python virtual environment, so that it is isolated from other projects.

Note

You can create the virtual environment wherever you prefer. In the instructions below, the virtual environment is located at ~/venv.

You can create a virtual environment with the following steps:

  1. Connect to Spartan.

    ssh spartan.hpc.unimelb.edu.au
    
  2. Load the required Spartan modules:

    module purge
    module load foss
    module load SciPy-bundle
    
  3. Create the virtual environment:

    cd
    python3 -m venv ~/venv
    
  4. Activate the virtual environment:

    source ~/venv/bin/activate
    

    Note

    Use your chosen location, rather than ~/venv.

  5. Ensure that the pip and setuptool packages are up to date:

    pip install --upgrade pip setuptools
    
  6. When you are not using the virtual environment, you can deactivate it:

    deactivate
    

Install from source

To install mcasopt on Spartan, follow these steps.

  1. Connect to Spartan.

    ssh spartan.hpc.unimelb.edu.au
    
  2. Load the required Spartan modules:

    module purge
    module load foss
    module load SciPy-bundle
    
  3. Activate the virtual environment:

    source ~/venv/bin/activate
    

    Note

    Use your chosen location, rather than ~/venv.

  1. Download the mcasopt source code. This will create a new directory called mcasopt.

    git clone https://bitbucket.org/robmoss/mcasopt.git
    
  2. Enter the mcasopt directory and install the package.

    cd mcasopt
    pip install -e .
    

Check that mcasopt is installed

You can check whether mcasopt has been installed correctly by trying to load it from within the Python interpreter.

  1. Launch the Python interpreter.

    python3
    
  2. Attempt to load mcasopt. This should produce no output.

    import mcasopt
    
  3. Exit the Python interpreter.

    exit()
    

Update from source

As updates to mcasopt are made, you may wish to upgrade the version that you have installed.

  1. Connect to Spartan.

    ssh spartan.hpc.unimelb.edu.au
    
  2. Enter the mcasopt directory and download updates to the package.

    cd mcasopt
    git pull