install python module by conda, but cannot import

Quote from Peng Hu on June 7, 2021, 5:56 amHi,
I create a conda environment 'ovito'. The python version in it is 3.8.10. I install the 'ovito python module' in this environment successfully. However, when I enter to the python interpreter, I cannot import ovito. My system is WSL Ubuntu 18. How can I fix it? Thank you a lot!
Hi,
I create a conda environment 'ovito'. The python version in it is 3.8.10. I install the 'ovito python module' in this environment successfully. However, when I enter to the python interpreter, I cannot import ovito. My system is WSL Ubuntu 18. How can I fix it? Thank you a lot!
Uploaded files:

Quote from Alexander Stukowski on June 7, 2021, 7:42 amHi,
Your screenshot shows that the
ovito
conda package did not get installed, because it was already installed. Perhaps, when you installed it the first time, you accidentally installed this version of the ovito package from the wrong source channel. Theovito
package from the conda-forge channel does not contain the OVITO Python module. Only our own version of theovito
package, from the channel http://conda.ovito.org, contains the Python module.You can run
conda list
to see the list of installed packages in your active environment and which source channels they came from. If you notice that theovito
package was installed from the conda-forge channel, then uninstall it first and reinstall it again using the fullconda install
command, which makes sure it gets fetched from the right channel:
conda install --strict-channel-priority -c https://conda.ovito.org -c conda-forge ovito
-Alex
Hi,
Your screenshot shows that the ovito
conda package did not get installed, because it was already installed. Perhaps, when you installed it the first time, you accidentally installed this version of the ovito package from the wrong source channel. The ovito
package from the conda-forge channel does not contain the OVITO Python module. Only our own version of the ovito
package, from the channel http://conda.ovito.org, contains the Python module.
You can run conda list
to see the list of installed packages in your active environment and which source channels they came from. If you notice that the ovito
package was installed from the conda-forge channel, then uninstall it first and reinstall it again using the full conda install
command, which makes sure it gets fetched from the right channel:
conda install --strict-channel-priority -c https://conda.ovito.org -c conda-forge ovito
-Alex

Quote from Peng Hu on June 7, 2021, 1:09 pmThank you very much for your prompt reply. I solved the problem by following your method. Now, I can import 'ovito' module and run a simple test successfully. However, I meet a small notice. When I import 'ovito' module each time, the terminal will print the following message. Can I ignore this?
Thank you again!
Thank you very much for your prompt reply. I solved the problem by following your method. Now, I can import 'ovito' module and run a simple test successfully. However, I meet a small notice. When I import 'ovito' module each time, the terminal will print the following message. Can I ignore this?
Thank you again!
Uploaded files:
Quote from Alexander Stukowski on June 7, 2021, 1:43 pmYou can safely ignore this warning message, yes. It's coming from the Qt framework used by OVITO.
There may be ways to solve the problem and make the message go away. I've searched for the message text online and found the following discussion, for example:
https://stackoverflow.com/questions/59790350/qstandardpaths-xdg-runtime-dir-not-set-defaulting-to-tmp-runtime-aadithyasb
You can safely ignore this warning message, yes. It's coming from the Qt framework used by OVITO.
There may be ways to solve the problem and make the message go away. I've searched for the message text online and found the following discussion, for example:

Quote from Peng Hu on June 8, 2021, 4:09 amThank you very much! I fix it with your shared link. But the new warning is printed, ‘This plugin does not support createPlatformOpenGLContext!’. Anyway, I think I can safely ignore this warning message as you said, and I'll start to study 'ovito mudule'.
Thanks for your reply again!
Thank you very much! I fix it with your shared link. But the new warning is printed, ‘This plugin does not support createPlatformOpenGLContext!’. Anyway, I think I can safely ignore this warning message as you said, and I'll start to study 'ovito mudule'.
Thanks for your reply again!
新的OVITO微信频道!
New for our users in China: OVITO on WeChat
Official OVITO WeChat channel operated by Foshan Diesi Technology Co., Ltd.
