Author Topic: Python loading error  (Read 579 times)


  • Newbie
  • *
  • Posts: 16
Python loading error
« on: November 23, 2017, 09:24:36 AM »
I tried to configure python interpreter on Windows.
1) I tried to compiled python script by using ovitos. I get the following error:

Error while loading OVITO submodule ovito.vis.gui: <class 'ImportError'>
Traceback (most recent call last):
  File "D:\Program Files\Ovito\plugins\python\ovito\", line 41, in <module>
  File "D:\Program Files\Ovito\lib\importlib\", line 109, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "D:\Program Files\Ovito\plugins\python\ovito\vis\gui\", line 6, in <module>
    import PyScriptGUI
ImportError: No module named 'PyScriptGUI'
ERROR: Failed to initialize Python interpreter.

2) I used Anaconda + PyCharm and added folder Ovito\plugins\python to PYTHONPATH variable.
However, when I compiled .py script with "import ovito" it outputs
Traceback (most recent call last):
  File "C:/Users/home/Documents/Python/OvitoAnalysis/", line 1, in <module>
    from import *
  File "D:\Program Files\Ovito\plugins\python\ovito\", line 19, in <module>
    from .plugins.PyScript import (version, version_string, gui_mode, headless_mode, DataSet, dataset, task_manager)
ImportError: DLL load failed: The specified procedure could not be found.

What have I missed or done wrong?

Alexander Stukowski

  • Administrator
  • Sr. Member
  • *****
  • Posts: 475
Re: Python loading error
« Reply #1 on: November 23, 2017, 03:04:51 PM »
I tried to reproduce the error, but so far I did not succeed. I downloaded and ran the Ovito exe installer from the website, opened the Windows command prompt, put the Ovito installation folder into the PATH environment variable and finally executed "ovitos". This worked without a problem for both Ovito 2.9.0 and Ovito 3.0.0-dev62.

Please let us know which version of Ovito you did install.

Perhaps there is some sort of interference from the Anaconda installation on your system. I will try to install Anaconda on my system too to see if that makes a difference.

Note that the Ovito python modules have been compiled for the CPython interpreter that ships with the Ovito installation packages. It's likely that they are not compatible with the Anaconda Python interpreter. That's why your second approach fails.


  • Newbie
  • *
  • Posts: 16
Re: Python loading error
« Reply #2 on: November 23, 2017, 04:23:14 PM »
The first problem has been solved. Perhaps, I did not properly install Ovito from .zip archive.
After reinstalling it I could compile the code using "ovitos".