Forum Navigation
You need to log in to create posts and topics.

Python module

Dear OVITO team,

In  the preconfigured Python interpreter—ovitos, I can import some python modules such as numpy and sys. However, I cannot import some other modules such as scipy.special and sympy. 

I am wondering if there is any way to make these python modules available within ovitos? Thank you.



I found the solution from your documentation:


Installing third-party Python modules in ovitos

OVITO’s embedded interpreter is a preconfigured version of the standard CPython interpreter with the ovito Python package built in. This makes it possible to run scripts both within the graphical program OVITO as well as through the ovitos command line interpreter. However, OVITO’s Python interpreter only ships with the NumPy and matplotlib preinstalled packages.

If you need to call other third-party Python packages from your OVITO scripts, it may be possible to install them in the ovitos interpreter using the normal pip or setuptools mechanisms (e.g., run ovitos -m pip install <package> to install a module from PyPI).

Installing Python extensions that include native code may fail, however, because such extensions may not be compatible with the build-time configuration of the embedded CPython interpreter. In this case, it is recommend that you instead install the ovito module in your system’s Python interpreter. Further instructions can be found here.




New for our users in China: OVITO on WeChat 

Official OVITO WeChat channel operated by Foshan Diesi Technology Co., Ltd.