Sometimes a PSSE won't open after install. This is almost always caused by an unexpected Python configuration.
If you're struggling with MOD, see the MOD Debug Notes
Behavior:
- Start PSSE
- result: PSSE splash screen appears, then PSSE instantly closes.
This one is painful because there are no error message. The best way to get some usable error messages is to run PSSE in the command line.
Open cmd.exe
then run this command a command like one of these:
"C:\Program Files\PTI\PSSE35\35.4\PSSBIN\pssecmd35.exe"
"C:\Program Files\PTI\PSSE35\35.5\PSSBIN\pssecmd35.exe"
"C:\Program Files\PTI\PSSE35\35.6\PSSBIN\pssecmd35.exe"
If you see a python error about the encoding
library, this section is for you.
This seems to happen because PSSE doesn't know how to find the encoding library.
Or by setting the PYTHONHOME variable:
SET PYTHONHOME=c:\Python39
You can also fix this by setting the PYTHONPATH variable:
SET PYTHONPATH=c:\Python39\Lib
In this example the encodings library is installed in C:\Python39\Lib\encodings
- which is why the environment fixes work.
Make sure you set your user variables not the system variables. To set env variables see Google
In general, it's a bad idea to set PYTHONPATH or PYTHONHOME - python should know how to find it's packages. This is a dirty workaround for PSSE. Setting the env variables globally is fine for testing, but please don't set these globally if you want any other python script to behave normally. Instead run PSSE from a bat file that looks like this:
SET PYTHONHOME=c:\Python39
start "" "C:\Program Files\PTI\PSSE35\35.4\PSSBIN\PSSE35.exe" %*
When you start PSSE it adds the the PATH found in this registry key to your python sys.path
:
> reg query HKEY_CURRENT_USER\SOFTWARE\Python\PythonCore\3.9\InstallPath
HKEY_CURRENT_USER\SOFTWARE\Python\PythonCore\3.9\InstallPath
(Default) REG_SZ c:\Python39\
If this registry entry points to the incompatible version of Python it will probably cause issues.
PSSE seems to ignore the PATH
env variable when it looks for the python install it's going to use.
If the registry points to a 32bit python instead of 64 bit, you get the error:
python load failed with error code 193
If the registry points to the wrong python version such as python 3.11 when PSSE expects python 3.9, you get the error:
python load failed with error code 126
How do you know which version of Python PSSE wants to use? Start the PSSE Installer and check what version it wants to install
PSSE 35.6 requires Python 3.11.9 64bit