Advanced Install

If you’ve completed the Quick Install guide, you can skip right to the Tutorial. This section is intended for users who wish to have more control over the install process or to compile from source code. If you’re looking for a simple solution, see the Quick Install guide.

Without Anaconda

If you already have Python 3.x installed from python.org or anywhere else, you can use your existing distribution instead of Anaconda (or Miniconda). Note that this does require manually installing some dependencies.

Windows

  1. Install the Visual C++ 2015 Runtime.

  2. Install numpy, scipy and matplotlib binaries from Christoph Gohlke.

  3. Pybinding is available as a binary wheel on PyPI. Install it with:

    pip3 install pybinding
    

Linux

Building pybinding from source is the only option on Linux.

  1. Make sure you have gcc and g++ v5.0 or newer. To check, run g++ --version in your terminal. Refer to instruction from your Linux distribution in case you need to upgrade. Alternatively, you can use clang v3.5 or newer for compilation instead of gcc.

  2. Install CMake >= v3.1 from their website or your package manager, e.g. apt-get install cmake.

  3. Install numpy, scipy and matplotlib with the minimal versions as stated previously. The easiest way is to use your package manager, but note that the main repositories tend to keep outdated versions of SciPy packages. For instructions on how to compile the latest packages from source, see http://www.scipy.org/.

  4. Install pybinding using pip:

    pip3 install pybinding
    

macOS

All the required SciPy packages and pybinding are available as binary wheels on PyPI, so the installation is very simple:

pip3 install pybinding

Note that pip will resolve all the SciPy dependencies automatically.

Compiling from source

If you want to get the latest version (the master branch on GitHub), you will need to compile it from source code. Before you proceed, you’ll need to have numpy, scipy and matplotlib. They can be installed either using Anaconda or following the procedure in the section just above this one. Once you have everything, follow the steps below to compile and install pybinding.

Windows

  1. Install Visual Studio 2017 Community. The Visual C++ compiler is required, so make sure to select it during the customization step of the installation (C++ may not be installed by default).

  2. Install CMake.

  3. Build and install pybinding. The following command will instruct pip to download the latest source code from GitHub, compile everything and install the package:

    pip3 install git+https://github.com/dean0x7d/pybinding.git
    

Linux

You’ll need gcc/g++ >= v5.0 (or clang >= v3.5) and CMake >= v3.1. See the previous section for details. If you have everything, pybinding can be installed from the latest source code using pip:

pip3 install git+https://github.com/dean0x7d/pybinding.git

macOS

  1. Install Homebrew.

  2. Install CMake: brew install cmake

  3. Build and install pybinding. The following command will instruct pip to download the latest source code from GitHub, compile everything and install the package:

    pip3 install git+https://github.com/dean0x7d/pybinding.git
    

For development

If you would like to work on the pybinding source code itself, you can install it in an editable development environment. The procedure is similar to the “Compiling from source” section with the exception of the final step:

  1. Clone the repository using git (you can change the url to your own GitHub fork):

    git clone --recursive https://github.com/dean0x7d/pybinding.git
    
  2. Tell pip to install in development mode:

    cd pybinding
    pip3 install -e .