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

Ask Your Question
0

PSSPY on WSL with Ubuntu?

asked Nov 8 '3

krizerator gravatar image

updated Nov 8 '3

I've been wondering if it's possible to set psspy running on Ubuntu. Just because I'm more familiar with bash commands instead of cmd. It'd be easier for me to run the python scripts from there.

Steps to reproduce what I've done so far, based on some tutorials I saw online:

  • Download and install PSSE35.3.
  • Set up Python 3.7 (I was told that for some reason it doesn't work with more recent python versions).
  • In the installation path, under PSSBIN, copy the folder for the corresponding python version and put it in PSSBIN. In this case, I would be adding PSSPY37.
  • Set up a virtual environment configured with Python 3.7.
  • In the python script, include the following code:

    import os, sys
    PSSE_PATH = r'/mnt/path/location/in/windows'
    sys.path.append(PSSE_PATH)
    os.environ['PATH'] += ':' + PSSE_PATH
    import psse35, psspy, redirect, dyntools, pssarrays

What I expect is that adding the path would include the pss libraries, but I still get a ModuleNotFoundError when I run the script.

   Traceback (most recent call last):
     File "test_file.py", line 10, in <module>
       import psse35, psspy, redirect, dyntools, pssarrays
   ModuleNotFoundError: No module named 'psse35'

Same thing happens to all the other imports in that line if I don't add the others as imports.

1 answer

Sort by » oldest newest most voted
0

answered Nov 8 '3

jconto gravatar image

UBuntu or not Ubuntu, the PSSe setup for a windows OS does not change:

- Item 1- install PSSe 35.6 latest
- Item 2- Not needed.  PSSe 35 install python 3.9 64-bit  version and it works fine with it.
- Item 3- Not needed.
- Item 4- do it after a 'normal' set up works ok.
- Item 5- Test the following:

import os, sys
import psse35
import psspy
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

Stats

Asked: Nov 8 '3

Seen: 2,325 times

Last updated: Nov 08 '23