Ask Your Question
0

Does Python 3.6 can work with psse

asked 2018-08-23 18:59:53 -0500

Gary22212 gravatar image

updated 2018-09-03 11:45:24 -0500

Dear everyone,

I know PSSe33 was built as a 32-bit application. and python2.7 of 32-bit works fine with PSSe33.04 in my work.

Does anyone know can PSSe work with python 3.6 of 32-bit? I tried but failed, the problem first happened at "import psspy", and the console indicates "bad magic number in psspy..."

Maybe there are problems in my settings, or there are restrictions in PSSe version?

And I also failed to make python of 64-bit (either 3.6 or 2.7) work with PSSe.

Thanks in advance!

Gary

edit retag flag offensive close merge delete

2 answers

Sort by ยป oldest newest most voted
1

answered 2018-09-03 06:21:54 -0500

jfconroy gravatar image

Hello Gary,

As far as I know, the Python modules for PSSE are compiled in v2.X of Python (note how there are numerous *.pyc files in the installation directories). Therefore, I doubt that everything will work correctly in Python v3.X.

edit flag offensive delete link more

Comments

Thank you jfconroy, yes now in my experience, only v2.X, 32 bit of Python can work with PSSe API.

Gary22212 gravatar imageGary22212 ( 2018-09-03 11:48:35 -0500 )edit
1

Psse v.34.4 also installs python 3.4 in addition to v.2.7, while PSSe v33 only install python 2.7 therefore other python versions would give the 'magic number' error when trying to load PSSe pyc modules.

jconto gravatar imagejconto ( 2018-09-03 19:46:48 -0500 )edit

Good to know that! Thank you, Mr Conto.

Gary22212 gravatar imageGary22212 ( 2018-09-03 21:50:25 -0500 )edit

@jconto How to ammend the magic number error then with psse v.33.4?

Sanij gravatar imageSanij ( 2020-05-28 21:13:58 -0500 )edit

Do not open a case by double-clicking on its icon. Instead, for any v.33.x, select the PSSe link icon launcher and right-click to open its 'Properties' panel. On the 'Target' field enter ""C:\Program Files (x86)\PTI\PSSE33\PSSBIN\psse33.exe" -pyver 27", then click 'Apply'

jconto gravatar imagejconto ( 2020-05-29 13:00:26 -0500 )edit
1

answered 2020-05-29 13:15:59 -0500

jconto gravatar image

Psse v.34.7 installs *.pyc modules for python v.3.7 and v.3.4, in addition to v.2.7, while PSSe v33 only install *.pyc modules for python 2.7 therefore other python versions (v.3.6, etc.) would give the 'magic number' error when trying to load PSSe pyc modules.

To assign a specific python version to PSSe I have separate launching link icons.

for PSSe v.34.7 + python v.3.7, select a PSSe link icon launcher (named PSSE3437) and right-click to open its 'Properties' panel. On the 'Target' field enter ""C:\Program Files (x86)\PTI\PSSE34\PSSBIN\psse34.exe" -pyver 37", then click 'Apply'

for PSSe v.34.7 + python v.2.7, select a PSSe link icon launcher (named PSSE3427) and right-click to open its 'Properties' panel. On the 'Target' field enter ""C:\Program Files (x86)\PTI\PSSE34\PSSBIN\psse34.exe" -pyver 27", then click 'Apply'

edit flag offensive delete link more

Comments

Thank you so much for your reply. Just have a little concerned, it seems that PSSe v.34.7 only works with python v.3.x in 32-bit version? So challenge still remains in interacting Pss/e with new python packages e.g.deep learning, which only available in py 3.6+ 64-bit version.

Gary22212 gravatar imageGary22212 ( 2020-06-11 00:38:53 -0500 )edit

E.g, if we train a control module for the system, we need to keep interacting data with deep learning models and PSS/E packages for thousands of episodes. Thus the barrier exists. An expedient method is to use subprocess, but it would greatly decrease program efficiency. ...Thank you for your reply!

Gary22212 gravatar imageGary22212 ( 2020-06-11 00:55:34 -0500 )edit

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

2 followers

Stats

Asked: 2018-08-23 18:59:53 -0500

Seen: 2,899 times

Last updated: May 29 '20