0

How can I initialize PSSE35 using python 3.9

Hi, I installed PSSE 35.3.3, and I have the follow script in python 3.9:

import sys
import os
psse_PATH=(r"""C:\\Program Files\\PTI\\PSSE35\\35.3\\PSSBIN""")
pssepy_PATH=(r"""C:\Program Files\PTI\PSSE35\35.3\PSSPY39""")
sys.path.append(psse_PATH)
envpath = ';'+psse_PATH
os.environ['PATH'] += envpath
sys.path.append(pssepy_PATH)
envpathpy = ';'+pssepy_PATH
os.environ['PATH'] += envpathpy
import psspy

I haver error importing psspy module. Do you now how I can solve it?

juancaquesada's avatar
1
juancaquesada
asked 2022-04-28 16:21:56 -0500
jconto's avatar
2.9k
jconto
updated 2022-04-28 16:46:30 -0500
edit flag offensive 0 remove flag close merge delete

Comments

add a comment see more comments

1 Answer

0

To initialize PSSe 35.x.y + python 39, the following would work:

import sys, os

#psse_PATH=(r"""C:\\Program Files\\PTI\\PSSE35\\35.3\\PSSBIN""")
pssepy_PATH=(r"""C:\Program Files\PTI\PSSE35\35.3\PSSPY39""")
#sys.path.append(psse_PATH)
#envpath = ';'+psse_PATH
#os.environ['PATH'] += envpath
sys.path.append(pssepy_PATH)
#envpathpy = ';'+pssepy_PATH
#os.environ['PATH'] += envpathpy

import psspy
psspy.psseinit()

or for single v.35 installation:

import sys, os
import psse35
import psspy
psspy.psseinit()
jconto's avatar
2.9k
jconto
answered 2022-04-28 16:56:00 -0500
edit flag offensive 0 remove flag delete link

Comments

Thanks jconto! It works correctly: >>> import psspy >>> psspy.psseinit() PSS(R)E Version 35 Copyright (c) 1976-2022 Siemens Industry, Inc., Power Technologies International (PTI) This program is a confidential unpublished work created and first licensed in 1976

juancaquesada's avatar juancaquesada (2022-04-29 09:05:13 -0500) edit

same question solved, thank! @jconto

GCK's avatar GCK (2024-06-01 00:31:52 -0500) edit
add a comment see more comments

Your Answer

Login/Signup to Answer