# Forest Plugin Problem

**URL:** <https://discuss.pennylane.ai/t/forest-plugin-problem/679>\
**Category:** PennyLane Forest\
**Created:** [November 16, 2020, 8:09pm UTC](https://discuss.pennylane.ai/t/forest-plugin-problem/679 "2020-11-16T20:09:05Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![lisaxu](https://yyz2.discourse-cdn.com/flex012/user_avatar/discuss.pennylane.ai/lisaxu/32/374_2.png) [@lisaxu](https://discuss.pennylane.ai/u/lisaxu)\
**Post date:** [November 16, 2020, 8:09pm UTC](https://discuss.pennylane.ai/t/forest-plugin-problem/679/1 "2020-11-16T20:09:05Z")

</div>

When I use the forest plugin for the Ensemble Classification demo, this message appears:

* * *

DistributionNotFound Traceback (most recent call last)  
 in   
1 n\_wires = 4  
2  
----\> 3 dev0 = qml.device(“forest.qvm”, device=“4q-qvm”)  
4 dev1 = qml.device(“qiskit.aer”, wires=4)  
5 devs = [dev0, dev1]

/Applications/anaconda3/envs/testrun\_project/lib/python3.8/site-packages/pennylane/ **init**.py in device(name, \*args, \*\*kwargs)  
185  
186 # loads the device class  
–\> 187 plugin\_device\_class = plugin\_devices[name].load()  
188  
189 if Version(version()) not in Spec(plugin\_device\_class.pennylane\_requires):

/Applications/anaconda3/envs/testrun\_project/lib/python3.8/site-packages/pkg\_resources/ **init**.py in load(self, require, \*args, \*\*kwargs)  
2444 )  
2445 if require:  
-\> 2446 self.require(\*args, \*\*kwargs)  
2447 return self.resolve()  
2448

/Applications/anaconda3/envs/testrun\_project/lib/python3.8/site-packages/pkg\_resources/ **init**.py in require(self, env, installer)  
2467 # requirements for that extra are purely optional and skip over them.  
2468 reqs = self.dist.requires(self.extras)  
-\> 2469 items = working\_set.resolve(reqs, env, installer, extras=self.extras)  
2470 list(map(working\_set.add, items))  
2471

/Applications/anaconda3/envs/testrun\_project/lib/python3.8/site-packages/pkg\_resources/ **init**.py in resolve(self, requirements, env, installer, replace\_conflicting, extras)  
768 if dist is None:  
769 requirers = required\_by.get(req, None)  
–\> 770 raise DistributionNotFound(req, requirers)  
771 to\_activate.append(dist)  
772 if dist not in req:

DistributionNotFound: The ‘ruamel.yaml’ distribution was not found and is required by rpcq

---

<div class="post-metadata">

**Author:** ![jmarrazola](https://yyz2.discourse-cdn.com/flex012/user_avatar/discuss.pennylane.ai/jmarrazola/32/255_2.png) [@jmarrazola](https://discuss.pennylane.ai/u/jmarrazola)\
**Post date:** [November 16, 2020, 9:53pm UTC](https://discuss.pennylane.ai/t/forest-plugin-problem/679/2 "2020-11-16T21:53:39Z")

</div>

Hi @lisaxu,

Welcome to the PennyLane discussion forum!

It seems that you are missing a [package](https://pypi.org/project/ruamel.yaml/) that is required by the device. I would try installing it using `pip install ruamel.yaml`.

If that doesn’t work, you can try following the [installation instructions](https://pennylane-forest.readthedocs.io/en/latest/installing.html) of the Forest plugin and checking that all software tests are passing.

Best,

Juan Miguel

---

<div class="post-metadata">

**Author:** ![lisaxu](https://yyz2.discourse-cdn.com/flex012/user_avatar/discuss.pennylane.ai/lisaxu/32/374_2.png) [@lisaxu](https://discuss.pennylane.ai/u/lisaxu)\
**Post date:** [November 19, 2020, 8:13pm UTC](https://discuss.pennylane.ai/t/forest-plugin-problem/679/3 "2020-11-19T20:13:28Z")

</div>

Hi,

I tried doing the installation but my computer gave a message that said I already had it downloaded. However, the code still didn’t work.

This message showed up-  
Requirement already satisfied: ruamel.yaml in /Applications/anaconda3/envs/testrun\_project/lib/python3.8/site-packages (0.15.87)

---

<div class="post-metadata">

**Author:** ![jmarrazola](https://yyz2.discourse-cdn.com/flex012/user_avatar/discuss.pennylane.ai/jmarrazola/32/255_2.png) [@jmarrazola](https://discuss.pennylane.ai/u/jmarrazola)\
**Post date:** [November 19, 2020, 9:05pm UTC](https://discuss.pennylane.ai/t/forest-plugin-problem/679/4 "2020-11-19T21:05:34Z")

</div>

Hi @lisaxu,

This is strange. The error message you are getting states that you are missing a distribution, but the distribution is installed! I know the feeling, these issues can be frustrating.

Have you tried checking that the PennyLane-Forest plugin is correctly installed? It should be enough to run `make test` in the source code folder. If that doesn’t show any errors, then the other thing that comes to mind is that there may be an issue with using python 3.8. You could try using 3.6, which appears to be the version used during development of the plugin.

If you’re still experiencing issues, let me know and I can contact the plugin developers directly.

Best,

Juan Miguel

---

<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:** [January 28, 2021, 1:54am UTC](https://discuss.pennylane.ai/t/forest-plugin-problem/679/5 "2021-01-28T01:54:28Z")

</div>

_Issue details_

Had almost the same error appear on a machine using WSL 2:

```auto
ImportError while loading conftest '/pennylane-forest/tests/conftest.py'.
tests/conftest.py:11: in <module>
    from ruamel import yaml
E ModuleNotFoundError: No module named 'ruamel'

```

Both `pip` and `conda` recognized `ruamel-yaml` as a package that was installed, however, `conda` gave no information on how it was installed.

When tried uninstalling/upgrading with `pip`, got:

```auto
ERROR: Cannot uninstall 'ruamel-yaml'. It is a distutils installed project and thus we cannot accurately determine which files belong to it which would lead to only a partial uninstall.

```

This error message [lead to a discussion](https://github.com/pypa/pip/issues/5247) for `pip`.

_Solution_

Removing every folder & file related to `ruamel_yaml` manually by `rm -r ~/anaconda3/lib/python3.8/site-packages/ruamel_yaml*` worked fine . Afterwords I could install `ruamel-yaml` using `pip`.

There are further suggestions too in the linked GitHub thread.
