Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dependencies issues for running the routing notebook #327

Open
Jaakik opened this issue Jan 11, 2023 · 1 comment
Open

Dependencies issues for running the routing notebook #327

Jaakik opened this issue Jan 11, 2023 · 1 comment

Comments

@Jaakik
Copy link

Jaakik commented Jan 11, 2023

Many imports in the notebooks are failing due to version incpompatibilies for the routing with tket notebook

ImportError                               Traceback (most recent call last)
[<ipython-input-26-f469bcac2048>](https://localhost:8080/#) in <module>
      1 import cirq
----> 2 import recirq
      3 import networkx as nx
      4 from cirq.contrib.svg import SVGCircuit
      5 import numpy as np

6 frames
[/usr/local/lib/python3.8/dist-packages/sphinx/util/rst.py](https://localhost:8080/#) in <module>
     19 from docutils.statemachine import StringList
     20 from docutils.utils import Reporter
---> 21 from jinja2 import Environment, environmentfilter
     22 
     23 from sphinx.locale import __

ImportError: cannot import name 'environmentfilter' from 'jinja2' (/usr/local/lib/python3.8/dist-packages/jinja2/__init__.py)

---------------------------------------------------------------------------
NOTE: If your import is failing due to a missing package, you can
manually install dependencies using either !pip or !apt.

To view examples of installing some common dependencies, click the
"Open Examples" button below.
---------------------------------------------------------------------------```

and when installing: 
`try:
    import recirq
except ImportError:
    !pip install -q git+https://github.com/quantumlib/ReCirq sympy~=1.6`

`  Preparing metadata (setup.py) ... done
ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
notebook 5.7.16 requires jinja2<=3.0.0, but you have jinja2 3.1.2 which is incompatible.
flask 1.1.4 requires click<8.0,>=5.1, but you have click 8.0.0 which is incompatible.
flask 1.1.4 requires Jinja2<3.0,>=2.10.1, but you have jinja2 3.1.2 which is incompatible.`


@PranithChowdary
Copy link

One solution to try is to upgrade the notebook package to a version that is compatible with the jinja2 version you have installed. You can do this by running !pip install notebook==6.1.5 (or any version that is compatible with your jinja2 version).

Then, you can try installing recirq again using !pip install recirq. If this does not work, you can try uninstalling and reinstalling jinja2 and recirq, ensuring that you have compatible versions of both packages.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants