Ask Your Question
0

PSSPY on WSL with Ubuntu?

asked 2023-11-08 04:04:36 -0500

krizerator gravatar image

updated 2023-11-08 04:47:01 -0500

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.

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

answered 2023-11-08 13:55:46 -0500

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
edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

[hide preview]

Question Tools

Stats

Asked: 2023-11-08 04:04:36 -0500

Seen: 2,286 times

Last updated: Nov 08 '23