# Error in running: demonstrations/quantum\_neural\_net.py

**URL:** <https://discuss.pennylane.ai/t/error-in-running-demonstrations-quantum-neural-net-py/769>\
**Category:** PennyLane Help\
**Created:** [January 16, 2021, 2:00am UTC](https://discuss.pennylane.ai/t/error-in-running-demonstrations-quantum-neural-net-py/769 "2021-01-16T02:00:37Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![cubicgate](https://yyz2.discourse-cdn.com/flex012/user_avatar/discuss.pennylane.ai/cubicgate/32/56_2.png) [@cubicgate](https://discuss.pennylane.ai/u/cubicgate)\
**Post date:** [January 16, 2021, 2:00am UTC](https://discuss.pennylane.ai/t/error-in-running-demonstrations-quantum-neural-net-py/769/1 "2021-01-16T02:00:37Z")

</div>

When I ran quantum\_neural\_net.py, I got:

```python
Traceback (most recent call last):
  File "C:\quantum_neural_net.py", line 35, in <module>
    import pennylane as qml
  File "C:\Miniconda3\lib\site-packages\pennylane\ __init__.py", line 113, in <module>
    qchem = entry.load()
  File "C:\Miniconda3\lib\site-packages\pkg_resources\ __init__.py", line 2453, in load
    return self.resolve()
  File "C:\Miniconda3\lib\site-packages\pkg_resources\ __init__.py", line 2459, in resolve
    module = __import__ (self.module_name, fromlist=[' __name__'], level=0)
  File "C:\Miniconda3\lib\site-packages\pennylane_qchem\ __init__.py", line 17, in <module>
    from . import qchem
  File "C:\Miniconda3\lib\site-packages\pennylane_qchem\qchem\ __init__.py", line 16, in <module>
    from .structure import *
  File "C:\Miniconda3\lib\site-packages\pennylane_qchem\qchem\structure.py", line 25, in <module>
    from openfermionpyscf import run_pyscf
ModuleNotFoundError: No module named 'openfermionpyscf'

```

I do not know the reason for calling:

```auto
qchem = entry.load()

```

when importing pennylane

I use Windows 10

Thanks!

---

<div class="post-metadata">

**Author:** ![glassnotes](https://yyz2.discourse-cdn.com/flex012/user_avatar/discuss.pennylane.ai/glassnotes/32/327_2.png) [@glassnotes](https://discuss.pennylane.ai/u/glassnotes)\
**Post date:** [January 16, 2021, 2:06pm UTC](https://discuss.pennylane.ai/t/error-in-running-demonstrations-quantum-neural-net-py/769/2 "2021-01-16T14:06:49Z")

</div>

Hi @cubicgate,

Thanks for reaching out! Unfortunately, some of the underlying libraries used in Pennylane-Qchem (namely, PySCF) are not supported in Windows. To use qchem on Windows we typically recommend to use a Linux-based system such as Windows Subsystem for Linux, or even something like [Colab](https://colab.research.google.com/notebooks/intro.ipynb).

For the `entry.load()` call, this is used to load up the qchem module if it is available. You can see the context in the source [here](https://pennylane.readthedocs.io/en/stable/_modules/pennylane.html).

That all being said, the `quantum_neural_net.py` demo doesn’t actually require PennyLane-Qchem. If you’ve installed `qchem` manually, uninstall it, verify that you can import PennyLane, and try again to run the demo. Also, ensure you’re using the latest version of PennyLane (0.13), as there was an [update a few months ago](https://github.com/PennyLaneAI/pennylane/pull/814) that should have made PySCF optional on Windows to enable a smooth installation that includes qchem (albeit without some of the functionality afford by PySCF).

Please let us know how it goes, and if you have any further questions!

---

<div class="post-metadata">

**Author:** ![cubicgate](https://yyz2.discourse-cdn.com/flex012/user_avatar/discuss.pennylane.ai/cubicgate/32/56_2.png) [@cubicgate](https://discuss.pennylane.ai/u/cubicgate)\
**Post date:** [January 16, 2021, 2:17pm UTC](https://discuss.pennylane.ai/t/error-in-running-demonstrations-quantum-neural-net-py/769/3 "2021-01-16T14:17:47Z")

</div>

Thanks @glassnotes for your help! After removing Pennylane and Pennylane-Qchem, and then reinstalling Pennylane, the program works.

---

<div class="post-metadata">

**Author:** ![glassnotes](https://yyz2.discourse-cdn.com/flex012/user_avatar/discuss.pennylane.ai/glassnotes/32/327_2.png) [@glassnotes](https://discuss.pennylane.ai/u/glassnotes)\
**Post date:** [January 16, 2021, 2:23pm UTC](https://discuss.pennylane.ai/t/error-in-running-demonstrations-quantum-neural-net-py/769/4 "2021-01-16T14:23:10Z")

</div>

Glad to hear it, thanks for letting us know!

---

<div class="post-metadata">

**Author:** ![Amandeep](https://yyz2.discourse-cdn.com/flex012/user_avatar/discuss.pennylane.ai/amandeep/32/385_2.png) [@Amandeep](https://discuss.pennylane.ai/u/Amandeep)\
**Post date:** [August 7, 2021, 6:25am UTC](https://discuss.pennylane.ai/t/error-in-running-demonstrations-quantum-neural-net-py/769/5 "2021-08-07T06:25:31Z")

</div>

After uninstall also, ModuleNotFoundError: No module named ‘openfermionpyscf’ keep on coming

---

<div class="post-metadata">

**Author:** ![antalszava](https://yyz2.discourse-cdn.com/flex012/user_avatar/discuss.pennylane.ai/antalszava/32/171_2.png) [@antalszava](https://discuss.pennylane.ai/u/antalszava)\
**Post date:** [August 9, 2021, 9:31pm UTC](https://discuss.pennylane.ai/t/error-in-running-demonstrations-quantum-neural-net-py/769/6 "2021-08-09T21:31:30Z")

</div>

Hi @Amandeep,

That sounds strange! Could you perhaps post the entire traceback? 🤔It would indicate that something is still using `openfermionpyscf`, which should not be the case.
