# Full Pennylane installation

**URL:** <https://discuss.pennylane.ai/t/full-pennylane-installation/671>\
**Category:** PennyLane Help\
**Created:** [November 10, 2020, 11:04pm UTC](https://discuss.pennylane.ai/t/full-pennylane-installation/671 "2020-11-10T23:04:57Z")\
**Posts on this page:** 10\
**Page:** 2

<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:** [November 25, 2020, 11:46pm UTC](https://discuss.pennylane.ai/t/full-pennylane-installation/671/21 "2020-11-25T23:46:57Z")

</div>

Hi @jerteach,

I’ve made a new [Github issue](https://github.com/PennyLaneAI/qml/issues/169) for this. Regarding:

> [@](#):
>
> One demo needs antlr4-python3-runtime==4.8, but `tutorial_vqe_parallel` needs antlr4-python3-runtime==4.7.2.

In order to look into this, it would be helpful to know which demo needs version 4.8 - is it all of the ones except the pyquil ones? Thanks!

---

<div class="post-metadata">

**Author:** ![jerteach](https://yyz2.discourse-cdn.com/flex012/user_avatar/discuss.pennylane.ai/jerteach/32/370_2.png) [@jerteach](https://discuss.pennylane.ai/u/jerteach)\
**Post date:** [November 26, 2020, 4:29am UTC](https://discuss.pennylane.ai/t/full-pennylane-installation/671/22 "2020-11-26T04:29:30Z")

</div>

I posted in the issues [https://github.com/PennyLaneAI/qml/issues/169#issuecomment-734066792](https://github.com/PennyLaneAI/qml/issues/169#issuecomment-734066792)

basically for me these files do not work after converting to 4.7.2

```auto
quantum_neural_net.py
qonn.py
tutorial_doubly_stochastic.py
tutorial_plugins_hybrid.py

```

---

<div class="post-metadata">

**Author:** ![jerteach](https://yyz2.discourse-cdn.com/flex012/user_avatar/discuss.pennylane.ai/jerteach/32/370_2.png) [@jerteach](https://discuss.pennylane.ai/u/jerteach)\
**Post date:** [November 27, 2020, 5:53pm UTC](https://discuss.pennylane.ai/t/full-pennylane-installation/671/23 "2020-11-27T17:53:13Z")

</div>

Has anyone from PennyLaneAI loaded my Gitpod? @glassnotes @antalszava @josh@Tom_Bromley ?

The nice thing about Gitpod, is that on first load it is a fresh install so everyone’s Gitpod is exactly the same.

These steps will be fairly easy to follow: (I have not made videos yet as I have not solved my Quantum Machine Learning to IOT devices simplification problem yet)

1. Login to Github, as Gitpod authorizes using Github

2. Load my Gitpod [https://gitpod.io/#github.com/hpssjellis/my-examples-for-quantum-computing](https://gitpod.io/#github.com/hpssjellis/my-examples-for-quantum-computing) Takes about 10 minutes so put it in it’s own browser window.

3. It should auto place you in `pennylaneai/qml-demos` if not use the terminal at the bottom of the screen to `ls` and `cd` to get there.

4. Run these commands to check if the code is working

```auto
python3 quantum_neural_net.py

python3 qonn.py

python3 tutorial_plugins_hybrid.py

```

You might be asked to load a Port Browser to show the plt.show() matplotlib Tab Open Ports --\> Open Preview or Browser. I `ctrl z` as some of the programs take a while to run.

1. Now reduce the version of antlr4-python3-runtime:

```auto
pip3 install antlr4-python3-runtime==4.7.2

```

1. And try the above commands again. I get errors.

2. I have a fancy error writing bash file if you like:

```auto
./a01-show-errors.sh
Enter file name of python file showing errors
making an errors.txt file to append these errors
qonn

```

Note: Filename only, no extension. Github code [here](https://github.com/hpssjellis/my-examples-for-quantum-computing/blob/main/pennylaneai/qml-demos/a01-show-errors.sh)

1. I hope it is useful, my Grade 9-12 students at [https://www.gearbots.org/overview/](https://www.gearbots.org/overview/) find [https://www.gitpod.io/](https://www.gitpod.io/) very useful and easy to use.

.

.

.

1. **Update** : It seems that `python3 tutorial_doubly_stochastic.py` is now working, it takes a long time to run, so perhaps I got impatient. Here is my error logs for the other three.

```auto
*********************
 *********************
Running Python file: quantum_neural_net
*********************

2020-11-27 17:46:27.068247: W tensorflow/stream_executor/platform/default/dso_loader.cc:59] Could not load dynamic library 'libcudart.so.10.1'; dlerror: libcudart.so.10.1: cannot open shared object file: No such file or directory
2020-11-27 17:46:27.068329: I tensorflow/stream_executor/cuda/cudart_stub.cc:29] Ignore above cudart dlerror if you do not have a GPU set up on your machine.
Traceback (most recent call last):
  File "quantum_neural_net.py", line 44, in <module>
    dev = qml.device("strawberryfields.fock", wires=1, cutoff_dim=10)
  File "/workspace/.pip-modules/lib/python3.7/site-packages/pennylane/ __init__.py", line 187, in device
    plugin_device_class = plugin_devices[name].load()
  File "/workspace/.pip-modules/lib/python3.7/site-packages/pkg_resources/ __init__.py", line 2446, in load
    self.require(*args, **kwargs)
  File "/workspace/.pip-modules/lib/python3.7/site-packages/pkg_resources/ __init__.py", line 2469, in require
    items = working_set.resolve(reqs, env, installer, extras=self.extras)
  File "/workspace/.pip-modules/lib/python3.7/site-packages/pkg_resources/ __init__.py", line 775, in resolve
    raise VersionConflict(dist, req).with_context(dependent_req)
pkg_resources.ContextualVersionConflict: (antlr4-python3-runtime 4.7.2 (/workspace/.pip-modules/lib/python3.7/site-packages), Requirement.parse('antlr4-python3-runtime==4.8'), {'quantum-blackbird'})

*********************
 *********************
Running Python file: qonn
*********************

2020-11-27 17:46:42.251644: W tensorflow/stream_executor/platform/default/dso_loader.cc:59] Could not load dynamic library 'libcudart.so.10.1'; dlerror: libcudart.so.10.1: cannot open shared object file: No such file or directory
2020-11-27 17:46:42.251724: I tensorflow/stream_executor/cuda/cudart_stub.cc:29] Ignore above cudart dlerror if you do not have a GPU set up on your machine.
Traceback (most recent call last):
  File "qonn.py", line 90, in <module>
    dev = qml.device("strawberryfields.fock", wires=4, cutoff_dim=4)
  File "/workspace/.pip-modules/lib/python3.7/site-packages/pennylane/ __init__.py", line 187, in device
    plugin_device_class = plugin_devices[name].load()
  File "/workspace/.pip-modules/lib/python3.7/site-packages/pkg_resources/ __init__.py", line 2446, in load
    self.require(*args, **kwargs)
  File "/workspace/.pip-modules/lib/python3.7/site-packages/pkg_resources/ __init__.py", line 2469, in require
    items = working_set.resolve(reqs, env, installer, extras=self.extras)
  File "/workspace/.pip-modules/lib/python3.7/site-packages/pkg_resources/ __init__.py", line 775, in resolve
    raise VersionConflict(dist, req).with_context(dependent_req)
pkg_resources.ContextualVersionConflict: (antlr4-python3-runtime 4.7.2 (/workspace/.pip-modules/lib/python3.7/site-packages), Requirement.parse('antlr4-python3-runtime==4.8'), {'quantum-blackbird'})

*********************
 *********************
Running Python file: tutorial_plugins_hybrid
*********************

2020-11-27 17:47:00.378067: W tensorflow/stream_executor/platform/default/dso_loader.cc:59] Could not load dynamic library 'libcudart.so.10.1'; dlerror: libcudart.so.10.1: cannot open shared object file: No such file or directory
2020-11-27 17:47:00.378151: I tensorflow/stream_executor/cuda/cudart_stub.cc:29] Ignore above cudart dlerror if you do not have a GPU set up on your machine.
Traceback (most recent call last):
  File "tutorial_plugins_hybrid.py", line 140, in <module>
    dev_fock = qml.device("strawberryfields.fock", wires=2, cutoff_dim=2)
  File "/workspace/.pip-modules/lib/python3.7/site-packages/pennylane/ __init__.py", line 187, in device
    plugin_device_class = plugin_devices[name].load()
  File "/workspace/.pip-modules/lib/python3.7/site-packages/pkg_resources/ __init__.py", line 2446, in load
    self.require(*args, **kwargs)
  File "/workspace/.pip-modules/lib/python3.7/site-packages/pkg_resources/ __init__.py", line 2469, in require
    items = working_set.resolve(reqs, env, installer, extras=self.extras)
  File "/workspace/.pip-modules/lib/python3.7/site-packages/pkg_resources/ __init__.py", line 775, in resolve
    raise VersionConflict(dist, req).with_context(dependent_req)
pkg_resources.ContextualVersionConflict: (antlr4-python3-runtime 4.7.2 (/workspace/.pip-modules/lib/python3.7/site-packages), Requirement.parse('antlr4-python3-runtime==4.8'), {'quantum-blackbird'})

```

---

<div class="post-metadata">

**Author:** ![josh](https://yyz2.discourse-cdn.com/flex012/user_avatar/discuss.pennylane.ai/josh/32/100_2.png) [@josh](https://discuss.pennylane.ai/u/josh)\
**Post date:** [December 4, 2020, 12:21pm UTC](https://discuss.pennylane.ai/t/full-pennylane-installation/671/24 "2020-12-04T12:21:26Z")

</div>

Hi @jerteach! Unfortunately I haven’t had a chance to check out your gitpod, but it sounds like it is progressing nicely 🙂

The only issue seems to be that a single environment will not support running all tutorials! Does gitpod allow you to have different environments for different groups of tutorials? Perhaps you could use something like a virtual env.

---

<div class="post-metadata">

**Author:** ![jerteach](https://yyz2.discourse-cdn.com/flex012/user_avatar/discuss.pennylane.ai/jerteach/32/370_2.png) [@jerteach](https://discuss.pennylane.ai/u/jerteach)\
**Post date:** [December 4, 2020, 10:39pm UTC](https://discuss.pennylane.ai/t/full-pennylane-installation/671/25 "2020-12-04T22:39:04Z")

</div>

I could load 2 gitpods, that would not be hard, or just run a bash file that install and uninstalls. but I have moved on from this issue as a few of the non-working tutorials seem to need a connection to a site that I don’t have, Anyway thanks for your help with this. It is closed for me now.

---

<div class="post-metadata">

**Author:** ![nathan](https://yyz2.discourse-cdn.com/flex012/user_avatar/discuss.pennylane.ai/nathan/32/85_2.png) [@nathan](https://discuss.pennylane.ai/u/nathan)\
**Post date:** [December 10, 2020, 5:57pm UTC](https://discuss.pennylane.ai/t/full-pennylane-installation/671/26 "2020-12-10T17:57:26Z")

</div>

Hi @jerteach,

Just as a brief follow-up here, on the off-chance that you are referring to the fact that a couple demos use Rigetti’s Forest and its “QVM”, these are actually not located at a website, but need to be activated locally (running a one-liner in a terminal), and can then be accessed via a local address. Not sure how you might do this on your gitpod system though

---

<div class="post-metadata">

**Author:** ![jerteach](https://yyz2.discourse-cdn.com/flex012/user_avatar/discuss.pennylane.ai/jerteach/32/370_2.png) [@jerteach](https://discuss.pennylane.ai/u/jerteach)\
**Post date:** [December 10, 2020, 7:02pm UTC](https://discuss.pennylane.ai/t/full-pennylane-installation/671/27 "2020-12-10T19:02:00Z")

</div>

@nathan

If someone can post an example (with fake Rigetti activation codes) I would give it a try, I think I have a Rigetti login, just never got their system to work. I really liked their potential to use Javascript, but no action has happened on that account for a while so I don’t think it is still active.

---

<div class="post-metadata">

**Author:** ![nathan](https://yyz2.discourse-cdn.com/flex012/user_avatar/discuss.pennylane.ai/nathan/32/85_2.png) [@nathan](https://discuss.pennylane.ai/u/nathan)\
**Post date:** [December 10, 2020, 8:08pm UTC](https://discuss.pennylane.ai/t/full-pennylane-installation/671/28 "2020-12-10T20:08:42Z")

</div>

Hi @jerteach,

You can download and run both the compiler and the qvm virtual machine locally, without needing any login details (things may have worked differently if you tried Rigetti Forest in the distant past). You can find the download and installation instructions [here](https://pyquil-docs.rigetti.com/en/stable/start.html). When we build those tutorials for our docs, we have it set up to run the necessary quilc compiler & qvm simulator in a separate process. The python scripts then “communicate” with these, even though all processes are running in the same machine. I’m not sure how it works on your gitpod system, but our docker commands are something like

```auto
docker run -d -p 5555:5555 rigetti/quilc -R -p 5555
docker run -d -p 5000:5000 rigetti/qvm -S -p 5000

```

Note: we don’t maintain these libraries, so we can’t necessarily help with any debugging issues you may come across.

---

<div class="post-metadata">

**Author:** ![jerteach](https://yyz2.discourse-cdn.com/flex012/user_avatar/discuss.pennylane.ai/jerteach/32/370_2.png) [@jerteach](https://discuss.pennylane.ai/u/jerteach)\
**Post date:** [December 14, 2020, 5:30am UTC](https://discuss.pennylane.ai/t/full-pennylane-installation/671/29 "2020-12-14T05:30:44Z")

</div>

> [@nathan](#):
>
> docker run -d -p 5555:5555 rigetti/quilc -R -p 5555 docker run -d -p 5000:5000 rigetti/qvm -S -p 5000

Those docker commands used to give me nightmares. Docker was a godsend when it first came out, but since using [Gitpod.io](http://Gitpod.io) I have forgotten everything I knew about Docker.

Thanks @nathan for posting the code. I tried loading both the sites using Gitpod but could not get them running.

---

<div class="post-metadata">

**Author:** ![nathan](https://yyz2.discourse-cdn.com/flex012/user_avatar/discuss.pennylane.ai/nathan/32/85_2.png) [@nathan](https://discuss.pennylane.ai/u/nathan)\
**Post date:** [December 14, 2020, 3:24pm UTC](https://discuss.pennylane.ai/t/full-pennylane-installation/671/30 "2020-12-14T15:24:38Z")

</div>

Sorry you couldn’t get it to work @jerteach. To be honest, while I used to have working versions of quilc and qvm running on my computer, when I recently installed the newest versions, they no longer run for me either. They do still work in our online build system (which creates the tutorials) though, so I had hoped they might work for you (don’t know much about gitpod though)

[Previous page](https://discuss.pennylane.ai/t/full-pennylane-installation/671.md?page=1)
