Author Topic: Error when running ovitos script if python3 is loaded  (Read 26 times)

OvitoUser

  • Newbie
  • *
  • Posts: 4
Error when running ovitos script if python3 is loaded
« on: August 13, 2019, 05:07:54 PM »
I have an ovitos script that I can run just fine with the command

ovitos my_script.py

However, when I load any python3 module that is available to me, I get the following error when running the command above:

Fatal Python error: Py_Initialize: can't initialize sys standard streams
Traceback (most recent call last):
  File "/software/python3/3.7.1/lib/python3.7/io.py", line 52, in <module>
  File "/software/python3/3.7.1/lib/python3.7/abc.py", line 147
    print(f"Class: {cls.__module__}.{cls.__qualname__}", file=file)
                                                      ^
SyntaxError: invalid syntax
[1]    40723 abort (core dumped)  ovitos my_script.py


The Ovito module I have loaded is 2.9.0 (which is slightly outdated now I believe?). Could this be why I am receiving this error? The reason I'm trying to use the newer version of python3 is because I get a "module NumPy not found" error if I don't.
« Last Edit: August 13, 2019, 05:18:09 PM by OvitoUser »

OvitoUser

  • Newbie
  • *
  • Posts: 4
Re: Error when running ovitos script if python3 is loaded
« Reply #1 on: August 13, 2019, 06:02:27 PM »
I updated to version 3 and it seems to have fixed the issue.