Pre-Report Checklist
- [x] I am running the latest versions of pyQuil and the Forest SDK
- [x] I checked to make sure that this bug has not already been reported
Issue Description
Hello developers, I'm encountering a problem in opening a jupyter notebook from this GitHub repository:
https://github.com/hsim13372/QCompress
When I run the example [qae_two_qubit_demo.ipynb]
I got the following error:
ModuleNotFoundError Traceback (most recent call last)
in
6 import scipy.optimize
7
----> 8 from pyquil.gates import *
9 from pyquil import Program
10
~/opt/anaconda3/lib/python3.8/site-packages/pyquil/init.py in
1 from pyquil._version import pyquil_version
----> 2 from pyquil.quil import Program
3 from pyquil.api import list_quantum_computers, get_qc
4
5 version = pyquil_version
~/opt/anaconda3/lib/python3.8/site-packages/pyquil/quil.py in
38
39 import numpy as np
---> 40 from rpcq.messages import NativeQuilMetadata, ParameterAref
41
42 from pyquil._parser.parser import run_parser
~/opt/anaconda3/lib/python3.8/site-packages/rpcq/init.py in
----> 1 from rpcq._client import Client, ClientAuthConfig
2 from rpcq._server import Server, ServerAuthConfig
3 # These are imported so that the corresponding data classes are
4 # registered whenever rpcq is imported. Without which one would have
5 # to import the messages and core_messages modules directly before
~/opt/anaconda3/lib/python3.8/site-packages/rpcq/_client.py in
24 import zmq.asyncio
25
---> 26 from rpcq._base import to_msgpack, from_msgpack
27 import rpcq._utils as utils
28 from rpcq.messages import RPCError, RPCReply
~/opt/anaconda3/lib/python3.8/site-packages/rpcq/_base.py in
20 import msgpack
21 import rapidjson
---> 22 from ruamel import yaml
23
24 if sys.version_info < (3, 7):
ModuleNotFoundError: No module named 'ruamel'
and [[run_landscape_scan.ipynb]]
(https://github.com/hsim13372/QCompress/blob/master/examples/run_landscape_scan.ipynb)
ModuleNotFoundError Traceback (most recent call last)
in
6 import scipy.optimize
7
----> 8 from pyquil.gates import *
9 from pyquil import Program
10
~/opt/anaconda3/lib/python3.8/site-packages/pyquil/init.py in
1 from pyquil._version import pyquil_version
----> 2 from pyquil.quil import Program
3 from pyquil.api import list_quantum_computers, get_qc
4
5 version = pyquil_version
~/opt/anaconda3/lib/python3.8/site-packages/pyquil/quil.py in
38
39 import numpy as np
---> 40 from rpcq.messages import NativeQuilMetadata, ParameterAref
41
42 from pyquil._parser.parser import run_parser
~/opt/anaconda3/lib/python3.8/site-packages/rpcq/init.py in
----> 1 from rpcq._client import Client, ClientAuthConfig
2 from rpcq._server import Server, ServerAuthConfig
3 # These are imported so that the corresponding data classes are
4 # registered whenever rpcq is imported. Without which one would have
5 # to import the messages and core_messages modules directly before
~/opt/anaconda3/lib/python3.8/site-packages/rpcq/_client.py in
24 import zmq.asyncio
25
---> 26 from rpcq._base import to_msgpack, from_msgpack
27 import rpcq._utils as utils
28 from rpcq.messages import RPCError, RPCReply
~/opt/anaconda3/lib/python3.8/site-packages/rpcq/_base.py in
20 import msgpack
21 import rapidjson
---> 22 from ruamel import yaml
23
24 if sys.version_info < (3, 7):
ModuleNotFoundError: No module named 'ruamel'
Please kindly shed some light on me, and thanks a lot!
Odd, it looks like ruamel.yaml is not being installed. That's a requirement of rpcq which is itself a requirement of pyquil, so installing pyquil should cause everything to be installed correctly. Can you try reinstalling the latest pyquil using the latest pip? So something like:
pip install --upgrade pip followed by pip install --upgrade pyquil