2

Message: "ImportError: No module named redirect"

Hi friends,

I have a new computer, please, when trying to run PSS/E from Python's IDLE, I get this message:

ImportError: No module named redirect

This is my full header:

import os,sys
sys.path.insert(0,'C:\\Program Files\\PTI\\PSSE33\\PSSBIN')
os.environ['PATH'] = 'C:\\Program Files\\PTI\\PSSE33\\PSSBIN'+';'+os.environ['PATH']
import redirect
redirect.psse2py()
import psspy
psspy.psseinit(150000)
_i=psspy.getdefaultint()
_f=psspy.getdefaultreal()
_s=psspy.getdefaultchar()
import excelpy

Please, does anyone know how to fix it ? Do I have to "install" the redirect module ? if so, please how ?

Thanks,

Andre

Mongo's avatar
91
Mongo
asked 2012-10-29 14:26:48 -0500
JervisW's avatar
1.3k
JervisW
updated 2012-10-29 18:18:22 -0500
edit flag offensive 0 remove flag close merge delete

Comments

2

I have figured out the error, my new machine is a 64-bit one and so PSS/E is in the x86 folder, Thanks, Andre

Mongo's avatar Mongo (2012-10-29 15:07:14 -0500) edit
add a comment see more comments

1 Answer

1

Hi Andre,

I see that you already worked out the answer. Just in case anyone else was having the same problem. Here is how to import if you are on a 64bit machine.

import os,sys
PSSE_PATH = r'c:\Program Files (x86)\PTI\PSSE33\PSSBIN'
sys.path.append(PSSE_PATH)
os.environ['PATH'] += ';' + PSSE_PATH

import redirect
redirect.psse2py()
import psspy
import excelpy

PSSE is installed in the "Program Files (x86)" folder not the "Program Files" folder for 64bit windows systems.

There are other ways to set up your PSSE path too. Check out this answer by chip for importing psspy

JervisW's avatar
1.3k
JervisW
answered 2012-10-29 18:29:12 -0500
edit flag offensive 0 remove flag delete link

Comments

add a comment see more comments

Your Answer

Login/Signup to Answer