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

Ask Your Question
0

psspy couldnt be resolved

asked Dec 15 '3

anonymous user

Anonymous

updated Dec 15 '3

jconto gravatar image

hi, I am trying to run a python code in visual studio. I am getting an error 'import psspy could not be resolved'. Although my code is running. Then why I am seeing this issue? used the following:

import os
import sys
psse_dir = r"C:\Program Files\PTI\PSSE35\35.5\PSSBIN"
sys.path.append(psse_dir)
os.environ['PATH'] = os.environ['PATH'] + ';' +  psse_dir

py_dir = r"C:\Program Files\PTI\PSSE35\35.5\PSSPY37"
sys.path.append(py_dir)
os.environ['PATH'] = os.environ['PATH'] + ';' +  py_dir

import psse35
import psspy

1 answer

Sort by » oldest newest most voted
0

answered Dec 15 '3

jconto gravatar image

The code works fine. The error could be related to the selection of python version in your set-up.
On the Visual Studio Code screen, click on the word "TERMINAL" on the lower menu, to activate the terminal box (behaves as a DOS windows) and then click on the version number next to "Python" on the 'new' menu on the bottom right side of the screen. Now you will see and select the right python version. For PSSe35, select python 3.7.x 64-bit. [In my setup, I use PSSe v.35.6 with python 3.9]

image description

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: Dec 15 '3

Seen: 1,597 times

Last updated: Dec 15 '23