0

import psse34 error

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 ?

liumhp2's avatar
1
liumhp2
asked 2019-07-04 16:41:26 -0500
edit flag offensive 0 remove flag close merge delete

Comments

add a comment see more comments

3 Answers

0

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.

Lvitor's avatar
11
Lvitor
answered 2021-12-12 23:16:20 -0500
edit flag offensive 0 remove flag delete link

Comments

add a comment see more comments
0

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.

drsgao's avatar
76
drsgao
answered 2019-07-05 02:59:27 -0500
edit flag offensive 0 remove flag delete link

Comments

add a comment see more comments
0

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
SOLOMON's avatar
1
SOLOMON
answered 2022-02-04 00:28:12 -0500
jconto's avatar
2.9k
jconto
updated 2022-02-04 08:50:26 -0500
edit flag offensive 0 remove flag delete link

Comments

add a comment see more comments

Your Answer

Login/Signup to Answer