quantumlib / OpenFermion-PySCF

OpenFermion plugin to interface with the electronic structure package PySCF.
Apache License 2.0
105 stars 44 forks source link

ImportError: No module named 'pyscf' but OpenFermion-PySCF is installed #23

Closed fernandodelaiglesia closed 6 years ago

fernandodelaiglesia commented 6 years ago

Hi,

I'm trying to run some of the examples (generate_diatomic.py) in my Fedora 25 desktop, but I always get the same error (see below), both installing pyscf in the development mode or as a user library

I'm using Python 3.5.4

I tried the same in CentOS 7 using python 2.7 with the same result

Any help will be welcome

Thanks

$ python3 diatomic.py 
Traceback (most recent call last):
  File "/home/fernando/QC/OpenFermion/OpenFermion-PySCF/openfermionpyscf/__init__.py", line 20, in <module>
    from ._run_pyscf import run_pyscf
  File "/home/fernando/QC/OpenFermion/OpenFermion-PySCF/openfermionpyscf/_run_pyscf.py", line 19, in <module>
    import pyscf
ImportError: No module named 'pyscf'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "diatomic.py", line 18, in <module>
    from openfermionpyscf import run_pyscf
  File "/home/fernando/QC/OpenFermion/OpenFermion-PySCF/openfermionpyscf/__init__.py", line 22, in <module>
    raise Exception("Please install PySCF.")
Exception: Please install PySCF.
babbush commented 6 years ago

Hi Fernando. There are actually two different things you must install: 1) pyscf and 2) openfermion-pyscf. It looks like you have not installed pyscf. You can do so from: https://github.com/sunqm/pyscf. Hopefully it is not too difficult. If you have trouble with pyscf I would recommend using psi4 instead. Or, you can always use the docker image distributed through the main openfermion repo. I am happy to answer further questions on this thread but I will "close" the issue (but you can keep commenting on it if you like).

fernandodelaiglesia commented 6 years ago

Hi @babbush

Thanks a lot for your help. I did not notice that it is clearly set in the installation instructions that you have to install both.

Thank you again and sorry for the inconveniences Best