Install

To install QuNetSim, we recommend using a Python Virtual environment. We give the instructions below on how to install the environment for each operating system.


Via pip

To install QuNetSim via pip: pip install qunetsim. The Python package comes with a script called template. Simply type template and follow the instructions to generate an example template.


Linux / Mac OS X

  1. Make sure you have python 3.5 or greater. For Mac OS users, one should have terminal commands installed.

  2. Download / Clone the Git repository.

    1. git clone git@github.com:tqsd/QuNetSim.git

  3. Here we use a Python virtual environment located at the same directory level as where the project is cloned (i.e. dont change directories after running step 1). Instructions for setting this up:

    1. python3 -m venv venv

    2. source ./venv/bin/activate

    3. pip install --upgrade pip

    4. pip install -r ./QuNetSim/requirements.txt

  4. To set the correct Python path run:

    1. export PYTHONPATH=$PYTHONPATH:$PWD/QuNetSim/

  5. After installing, you can use the templating script to get started. It will generate a file with the common structure of a QuNetSim use.

    1. python3 ./QuNetSim/templater.py

    2. The template will perform a small example which can be run: python3 <name of your file>.py


Windows

  1. Make sure you have python 3.5 or greater.

  2. Download / Clone the Git repository.

    1. git clone git@github.com:tqsd/QuNetSim.git

  3. Here we use a Python virtual environment located at the same directory level as where the project is cloned (i.e. dont change directories after running step 1). Instructions for setting this up:

    1. python3 -m venv venv

    2. .\venv\Scripts\activate

    3. python -m pip install --upgrade pip

    4. python -m pip install -r .\QuNetSim\requirements.txt

  4. To set the correct Python path we need to set the PYTHONPATH system variable:

    1. Open System Properties -> Advanced

    2. Click “Environment Variables”

    3. In the System Variable area (the bottom part)

    4. If the PYTHONPATH variable already exists then add C:\<PATH_TO_QUNETSIM>\QuNetSim to the path, replacing <PATH_TO_QUNETSIM> with the path to where QuNetSim is located.

    5. Otherwise, click New and add a variable PYTHONPATH with value C:\<PATH_TO_QUNETSIM>\QuNetSim, replacing <PATH_TO_QUNETSIM> with the path to where QuNetSim is located.

  5. After installing, you can use the templating script to get started. It will generate a file with the common structure of a QuNetSim use.

    1. python3 .\QuNetSim\templater.py

    2. The template will perform a small example which can be run: python3 <name of your file>.py