Installation of interfaces
Python
Automatic installation
Simply use pip install G2S
Manual compilation
- If needed Python and build dependencies:
sudo apt install python3-distutils python3-dev python3-numpy -y - (A C++ compiler with c++17 is required)
- Go to
build/python-build - Install the Python build/runtime dependencies:
python3 -m pip install -U build numpy pyzmq requests tifffile - Run
python3 setup.py install --user
Check proper interface installation
Simply run from g2s import g2s; g2s('--version')
MATLAB
Installation on Ubuntu
- (A C++ compiler with c++17 is required)
- Install the static ZeroMQ and libsodium libraries:
sudo apt install libzmq3-dev libsodium-dev - Open MATLAB (R2018a or later)
- Go to
build/matlab-build - Run
CompileG2S - Add compiled file in the MATLAB path
Installation on macOS
Supported and tested on Apple Silicon (arm64) with Homebrew. Intel Macs are not supported explicitly.
- Install the Xcode command line tools and the static ZeroMQ and libsodium libraries:
brew install zeromq libsodium - Open MATLAB (R2018a or later)
- Go to
build/matlab-build - Run
CompileG2S - Add compiled file in the MATLAB path
Installation on Windows 10
Download precompiled interfaces
- Download here.
- Unzip and add the folder to MATLAB path.
Manual compilation
- (A C++ compiler with c++17 is required)
- Open MATLAB (R2018a or later)
- Install a compiler with c++17, available here (2017 or later)
- Go to
build/matlab-build - Run
CompileG2S - Add compiled file in the MATLAB path
Notes
- jsoncpp and cppzmq are bundled in
include_interfaces/third_partyand compiled into the MEX file, so no jsoncpp library needs to be installed. CompileG2Sbuilds the C++ MEX API interface. To build the older C API interface instead, set the environment variableG2S_MATLAB_LEGACY_API=1before runningCompileG2S(for examplesetenv('G2S_MATLAB_LEGACY_API','1')).
Check proper interface installation
Simply run g2s('--version')
R
TODO !