Module Not Found Error when Trying to Import psi4_losc

Hello,

I am a new user of psi4. I installed psi4 1.3.2 through conda on my online supercomputing cluster to do some single-point energy calculations. When I tried to import psi4 and the module psi4_losc in the input to calculate the corrected orbital energy of water, the following error message appeared:


‘’‘Traceback (most recent call last):
File “psi4_H2O.py”, line 2, in
import psi4_losc
ModuleNotFoundError: No module named ‘psi4_losc’’‘’

This is the Python input script that I use for the calculation:

Does anyone have any idea what is going wrong? Please help me and thank you so much!

By the way, here are some additional information about my conda and psi4 installation in case you need it:




psi4_losc is a specific group’s research code that interfaces with Psi, so this probably isn’t a Psi problem so much as a problem on your computer’s paths.

Enter the psi4 conda environment, Run python from the command line, and try import psi4_losc. If that doesn’t work, go look up what PYTHONPATH is and how the import system works. If that does work, report what which python gives.

Hi, sorry for the late reply. I tried running Python from the command line and ‘’‘import psi4_losc’‘’ but the same error message appears:
image

I am not sure if setting the PYTHONPATH will help because I cannot find the directory where psi4_losc is located in the first place. (I will ask the group that developed psi4_losc about this and let you know what they say).

And here is what ‘’‘which python’‘’ gives:
image

Are you sure you even have psi4_losc?

According to the tutorial, psi4_losc should be included as a plugin when I conda install psi4, but apparently, it is not in my conda list.

It isn’t included in a conda installation of Psi4. This is a problem for whoever gave you that tutorial.