# ImportError when setting up PySCF driver

I have a problem when attempting to set up a PySCF driver for a hydrogen molecule from the QISKIT Chemistry tutorial: https://qiskit.org/documentation/tutorials/chemistry/01_electronic_structure.html.

The code:

from qiskit.chemistry.drivers import PySCFDriver, UnitsType, Molecule

molecule = Molecule(geometry = [['H', [0., 0., 0.]],
['H', [0., 0., 0.735]]],
charge = 0 , multiplicity = 1)

driver = PySCFDriver(molecule = molecule, unit = UnitsType.ANGSTROM, basis = 'sto3g')


When this is run, I receive: ImportError: cannot import name 'Molecule' from 'qiskit.chemistry.drivers' (C:\Users\louis\anaconda3\lib\site-packages\qiskit\chemistry\drivers_init_.py) I am not entirely sure what is causing this error and any help would be appreciated.

## 1 Answer

The molecule was introduced in the latest release. You need qiskit aqua 0.8.0. Can you provide information of your qiskit versions and your operating system? In case you need to update to the latest version to run the tutorials.

• Qiskit versions: {'qiskit-terra': '0.15.2', 'qiskit-aer': '0.6.1', 'qiskit-ignis': '0.4.0', 'qiskit-ibmq-provider': '0.10.0', 'qiskit-aqua': '0.7.5', 'qiskit': '0.22.0'} Operating system is Windows 10 Nov 5 '20 at 13:19
• As the other answer pointed out, Molecule is a new release of Qiskit so you would need to update your Qiskit to the latest version to use it (maybe through pip install qiskit --upgrade). I just tried to use it on the latest version of qiskit {'qiskit-terra': '0.16.0', 'qiskit-aer': '0.67.0', 'qiskit-ignis': '0.5.0', 'qiskit-aqua': '0.8.0', 'qiskit': '0.23.0'} and the code you posted seems to work just fine. Nov 5 '20 at 16:35
• Thank you for the responses as you have fixed the original issue, however, a new one has come up. When running the code above, I now receive QiskitChemistryError: 'PySCF is not installed. See https://sunqm.github.io/pyscf/install.html' I thought PySCF was installed but decided to attempt to install it anyway in the anaconda prompt with: pip install pyscf But this returns an error: NameError: name 'LD_LIBRARY_PATH' is not defined Any help to fix this problem would be appreciated. Nov 5 '20 at 18:47
• @LouisL This might be a problem... because PySCF works in Linux environment and you are using Windows. I am not sure if you can pip install PySCF. One quick work around that I can think of is to use the IBMQ Experience Jupyter notebook environment. There should be no problem there. Nov 5 '20 at 19:20
• @KAJ226 Thank you for the help, using the IBMQ Experience Jupyter notebook environment has no problem. I was unaware PySCF only worked in a Linux environment (always read the fineprint!) Nov 10 '20 at 14:18