PSSE 35 + Python Setup Guide

This guide walks through setting up PSSE 35.3.0 with compatible Python versions, including path configuration and initializing the simulator using psspy.

1. Screenshot

PSSE Launch Screenshot

2. Python Setup Script

Use the following script to configure Python and PSSE paths automatically, and initialize PSSE:

import sys
import os

psseversion = 35
pythonversion = '{}.{}'.format(sys.version_info[0], sys.version_info[1])

if psseversion == 35:
    if pythonversion in ['2.7', '3.7', '3.8', '3.9']:
        pyver_short = int(pythonversion.replace('.', ''))
        psse_path = r"C:\Program Files\PTI\PSSE35\35.3\PSSPY{}".format(pyver_short)
        sys.path.append(psse_path)
        os.environ['PATH'] = psse_path + ";" + os.environ['PATH']
        import psse35
    else:
        print("Unsupported Python version for PSSE 35.")
        sys.exit()

elif psseversion == 34:
    if pythonversion in ['2.7', '3.4', '3.7', '3.9']:
        pyver_short = int(pythonversion.replace('.', ''))
        psse_path = r"C:\Program Files (x86)\PTI\PSSE34\PSSPY{}".format(pyver_short)
        sys.path.append(psse_path)
        os.environ['PATH'] = psse_path + ";" + os.environ['PATH']
        import psse34
    else:
        print("Unsupported Python version for PSSE 34.")
        sys.exit()

elif psseversion == 33:
    if pythonversion == '2.7':
        psse_path = r"C:\Program Files (x86)\PTI\PSSE33\PSSBIN"
        sys.path.append(psse_path)
        os.environ['PATH'] = psse_path + ";" + os.environ['PATH']
    else:
        print("Unsupported Python version for PSSE 33.")
        sys.exit()
else:
    print("Invalid PSSE version selected.")
    sys.exit()

# Initialize
import psspy
psspy.psseinit(buses=150000)

3. Step-by-Step Instructions

  1. Install a compatible 64-bit Python version (3.7, 3.8, or 3.9).
  2. Update the paths in the script above to match your actual PSSE installation directory.
  3. Run the script in your terminal or IDE (Run as Administrator if needed).
  4. Check the output to confirm PSSE initializes with 150,000 buses.

4. Notes

← Back to Resume