1. Requirements

  • Python 3.9+

  • C compiler:

    • On macOS: Xcode command line tools

    • On Linux: gcc and build-essential

    • On Windows: MSVC (Visual Studio 2022 or later)

You can first build Python from source if you want.

2. Prepare

Linux / macOS
python3 -m venv vgxenv
. vgxenv/bin/activate
Windows
python -m venv vgxenv
call vgxenv\Scripts\activate.bat

2.2. Tools

pip install setuptools build wheel

3. Build PyVGX

3.1. Get source code and check out target branch

Clone vgxserver git repo
git clone https://github.com/slysne/vgxserver.git
cd vgxserver
git checkout v3.6

3.2. Build

Linux and MacOS
./build-unix.sh --version 3.6 --type release
Windows
build-win64.cmd 3.6 release

This will build and install the pyvgx package. (You can find the build output wheel in vgxserver/../build-pyvgx/dist.)

4. Test

First create a working directory somewhere and cd into it. Then you can run one or more of the following basic tests to verify your build.

4.1. Verify PyVGX Installed

This will print some information and exit.

python -c "import pyvgx"

4.2. Demo Service

Start the demo service to verify all internal communication works.

This will use ~16GB of RAM
Start demo service
vgxdemoservice multi
# ... service will start, admin page will load in a browser
Stop demo service
vgxdemoservice stop

4.3. Run Test Suite

You can run the pyvgx test suite by following these steps:

  • Copy vgxserver/test to your working directory

  • Run python test_pyvgx.py

Linux / macOS
# Assume WORKING is your temporary test directory
# E.g. WORKING=~/working
# Start in cloned repo:
cd vgxserver
cp -r pyvgx/test $WORKING/test
cd $WORKING/test
python test_pyvgx.py
Windows
rem Assume WORKING is your temporary test directory
rem E.g. set WORKING=C:%HOMEPATH%\working
rem Start in cloned repo:
cd vgxserver
xcopy /E /I /Q /Y pyvgx\test %WORKING%\test
cd /D %WORKING%/test
python test_pyvgx.py

python test_pyvgx.py will run the full suite of tests and takes several hours to complete.

You can run a smaller subset of quick tests like this:

  • python test_pyvgx.py --quick 1

You can also run tests for specific components or sub-modules:

  • python test_pyvgx.py --component Vector

  • python test_pyvgx.py --component Graph --module Evaluator --testset BasicEvaluator


PYVGX