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

Ask Your Question
0

import psse34 error

asked Jul 4 '19

liumhp2 gravatar image

In the psse34 documents, they said for psse 33.8+ we could just use import psse 34 instead of

sys.path.append(PSSPY_location)
sys.path.append(PSSE_location)
os.environ['PATH'] += ';' + PSSPY_location
os.environ['PATH'] += ';' + PSSE_location

but when i tried to do this, the pycharm told me " ImportError: No module named psse34"

Is there any requirement or pre-setting i need to do to use this import psse34 ?

3 answers

Sort by » oldest newest most voted
0

answered Feb 4 '2

updated Feb 4 '2

jconto gravatar image

I had the same issue in version 35.3. This solved the issue for me:

import os
import sys
#Import PSSE_PATH
PSSE_PATH = r"C:\Program Files\PTI\PSSE35\35.3\PSSBIN32"
os.environ['PATH'] += ';' + PSSE_PATH

#Import Modules
import psse3503
import psspy
link
0

answered Dec 13 '1

Lvitor gravatar image

You should check if the psse34 module is actually called pssexplore34.

Check your path (C:\Program Files (x86)\PTI\PSSEXplore34\PSSPY34) and the module name.

link
0

answered Jul 5 '19

drsgao gravatar image

I am gussing that you do not have admin right?

If you do not have admin right then you cannot modify the environmental variable "Path" whatsoever (neither the user ones nor the system ones). If this is the case, you would still need to do the dynamic addition like in the past.

If you do have admin right, just add the "psse34" directory path to the "Path" and then it should be alright.

Another thing is that I notice that you have different codes for importing. One is "psse 34" and the other is "psse34". If this is not a typo, then you need to make sure that your import module name is identical to the one on your computer.

link

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

1 follower

Stats

Asked: Jul 4 '19

Seen: 2,636 times

Last updated: Feb 04 '22