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

Ask Your Question
0

ppspy and redirect import fail

asked Oct 22 '0

pff gravatar image

updated Oct 22 '0

jconto gravatar image

I have checked that in C:\Program Files (x86)\PTI\PSSE34\PSSPY37 there are psspy and redirect modules. Nevertheless, when I try:

import os, sys
sys_path_PSSE=r'C:\Program Files (x86)\PTI\PSSE34\PSSPY37' 
sys.path.append(sys_path_PSSE) 
os_path_PSSE=r'C:\Program Files (x86)\PTI\PSSE34\PSSBIN' 
os.environ['PATH'] += ';' + os_path_PSSE 
os.environ['PATH'] += ';' + sys_path_PSSE 
import  psspy, redirect
redirect.psse2py()

Both modules are not found

2 answers

Sort by » oldest newest most voted
0

answered Oct 24 '0

Carlos G gravatar image

updated Oct 24 '0

Use the syspath with the psse-python location you want yo use and execute according to that syspath,

py -2-86 file.py py -2-64 file.py py -3-86 file.py py -3-64 file.py

Br

link
0

answered Oct 22 '0

jconto gravatar image

Check the post "Python 3.7 w/ PSSE 34". Your path looks OK to me. Post the error message that you get. do you have multiple python installations? Is the python version a 32-bit one? You can try:

import os, sys
import psse34
import psspy
psspy.psseinit()
link

Comments

Inside PSSE34 I have the following folders: PSSPY27, PSSPY34 and PSSPY37. In C: I have python27 and 37. I have version 34.7 (In program files x86), 35.0 and 35.1 (in Program files) installed.

pff gravatar imagepff (Oct 23 '0)

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

2 followers

Stats

Asked: Oct 22 '0

Seen: 639 times

Last updated: Oct 24 '20