Author Topic: Failed to initialize Python interpreter.  (Read 288 times)


  • Newbie
  • *
  • Posts: 8
Failed to initialize Python interpreter.
« on: March 18, 2019, 02:15:14 PM »

I am not able to run any python script on ovito in the graphical mode. When I run a little python script with ovitos everything works fine. The moment I open the graphical interface, load my files and open the python modifier I get the following error:
 "Failed to initialize Python interpreter"

Then I get the message:
"ovito crashed with ModuleNotFind error" in /usr/bin/.../lib/ovito/plugins/python/ovito/vis/ no module named PyQt5"

It is strange because everything was working fine last week. I tried to uninstall and install ovito but it didn't work.

Thank you in advance, best

Carolina Baruffi

Alexander Stukowski

  • Administrator
  • Hero Member
  • *****
  • Posts: 638
Re: Failed to initialize Python interpreter.
« Reply #1 on: March 18, 2019, 03:38:38 PM »
Hi Corolina,

Did you install one of the Ovito packages we provide on our website? If so, which version? This question is just to make sure you did not install an old version of Ovito from the Debian package repository, for example.

In which location on your computer did you extract the Ovito archive during installation? The error message suggest you have installed it under /usr/bin/. Is this correct? Ovito is commonly installed under a user's home directory.

How did you run "ovito" (the graphical program)? If you run it from the terminal in the same way you run "ovitos", the two should behave exactly the same. Depending on how you run the two, they may see different environment variables (e.g. PYTHONPATH), which in turn may affect the loading of Python modules.



  • Newbie
  • *
  • Posts: 8
Re: Failed to initialize Python interpreter.
« Reply #2 on: March 19, 2019, 09:25:59 AM »
Yes, I think it was a problem of environment variables. I installed it via the application manager of ubuntu  and it put it not in the /usr/bin directory. I uninstall everything and manually install it in my home directory after downloading the last stable version. Now everything works fine.

I apologize for the time loss and the unusefull topic opened.