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

Ask Your Question
0

ImportError: No module named psspy

asked Jan 13 '19

user1 gravatar image

I have PsseExplore34, and python 2.7.13, and my PSSE path is

C:\Program Files (x86)\PTI\PSSEXplore34\PSSBIN

and psspy.pyc is there

C:\Program Files (x86)\PTI\PSSEXplore34\PSSPY34

and C:\Program Files (x86)\PTI\PSSEXplore34\PSSPY27

this is part of my code that import psse

import os,sys

PSSE_PATH = r'C:\Program Files (x86)\PTI\PSSEXplore34\PSSBIN'

sys.path.append(PSSE_PATH)

os.environ['PATH'] += ';' + PSSE_PATH

import psspy

,but whenever I run it I got this error message ImportError: No module named psspy I put this line import psse34 before impoert psspy, but it still does not work.

what should I do?

2 answers

Sort by » oldest newest most voted
0

answered Jan 23 '19

SqFKYo gravatar image

If you're on a newer version of PSS products, you can do import psse33 or import psse34 instead of the explicit extra path adding.

link
0

answered Jan 21 '19

jfconroy gravatar image

Do a quick sanity check. Open PSSE explore, and then type

import psspy

into the Python command line. If you don't get an error message in the Output Bar, then there's some problem linking everything up externally.

link

Comments

Thanks for the help. My problem is solved as following: sys_path_PSSE=r'C:\Program Files (x86)\PTI\PSSEXplore34\PSSPY27' sys.path.append(sys_path_PSSE) os_path_PSSE=r'C:\Program Files (x86)\PTI\PSSEXplore34\PSSBIN' os.environ['PATH'] += ';' + os_path_PSSE

user1 gravatar imageuser1 (Jan 22 '19)

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: Jan 13 '19

Seen: 1,841 times

Last updated: Jan 23 '19