First time here? We are a friendly community of Power Systems Engineers. Check out the FAQ!

Ask Your Question
0

How can I initialize PSSE35 using python 3.9

asked Apr 28 '2

juancaquesada gravatar image

updated Apr 28 '2

jconto gravatar image

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?

1 answer

Sort by » oldest newest most voted
0

answered Apr 28 '2

jconto gravatar image

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()
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 gravatar imagejuancaquesada (Apr 29 '2)

same question solved, thank! @jconto

GCK gravatar imageGCK (Jun 1 '4)

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.
Want to format code in your answer? Here is a one minute demo on Youtube

Add Answer

[hide preview]

Question Tools

Stats

Asked: Apr 28 '2

Seen: 2,291 times

Last updated: Apr 28 '22