Ask Your Question
0

ppspy and redirect import fail

asked 2020-10-22 03:17:15 -0500

pff gravatar image

updated 2020-10-22 09:13:56 -0500

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

edit retag flag offensive close merge delete

2 answers

Sort by ยป oldest newest most voted
0

answered 2020-10-24 09:50:18 -0500

Carlos G gravatar image

updated 2020-10-24 09:53:06 -0500

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

edit flag offensive delete link more
0

answered 2020-10-22 10:27:34 -0500

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()
edit flag offensive delete link more

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 ( 2020-10-23 00:52:16 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

[hide preview]

Question Tools

2 followers

Stats

Asked: 2020-10-22 03:17:15 -0500

Seen: 570 times

Last updated: Oct 24 '20