Windows

Note

Choose the section suitable for the GSTPy installation package (win32 or win64).

Install GSTPy

Install the GSTPy Module with the supplied installer. (If you are reading this, you’ve probably already done this).

Install Python 2.7

GSTPy requires a Python 2.7 installation.

win64

  • The release used for building this package can be found here: Python 2.7.13.
  • Choose the file “Windows x86-64 MSI installer”.
  • Execute the installer and follow the installation instructions.

win32

  • The release used for building this package can be found here: Python 2.7.13.
  • Choose the file “Windows x86 MSI installer”.
  • Execute the installer and follow the installation instructions.

Generally, any of the 2.7.x releases should work. But only the one linked above was tested.

The GSTPy module depends on the python27.dll. If you used the offical installer, this should work out of the box. Otherwise you need to add the directory containing your python27.dll to your PATH environment variable. Alternatively, you could also copy your python27.dll directly into the GSTPy module directory.

Install Visual C++ Redistributable Packages

win64

win32

Let Python find the GSTPy module

The GSTPy module is located in the bin subdirectory.

If you installed GSTPy under C:\Users\Max\Documents\GiGa infosystems\GSTPy the GSTPy module directory is C:\Users\Max\Documents\GiGa infosystems\GSTPy\bin.

There are three options how we can tell Python about this module directory.

.pth File in Python site-packages

  1. Navigate to your Python install directory (default: “C:\Python27”).
  2. Go to Lib\site-packages.
  3. Add a new file named GSTPy.pth
  4. Edit GSTPy.pth and add the GSTPy module directory as entry.

Example:

C:\Python27\Lib\site-packages\GSTPy.pth
C:\Users\Max\Documents\GiGa infosystems\GSTPy\bin

Environment variable

Add the GSTPy module directory to the PYTHONPATH environment variable.

Local to a Python script

There also exists a method to add it directly in a Python script.

import sys
sys.path.insert(0, r"C:\Users\Max\Documents\GiGa infosystems\GSTPy\bin")
# now Python can find the GSTPy module
import GSTPy

Disadvantage is, you have to use this in any script that imports GSTPy.