jupyter and cirq conflicts with jsonschema and attrs

255 Views Asked by At

I use windows 11 and python 3.11.5, and try to install cirq and jyputer notebook in virtual environment.

First, I installed virtuanenv and make an environment.

pip install virtualenv
pip -m venv ofpyq
cd ofpyq\Script
.\Activate.ps1

Next, I installed jupyter.

pip install jupyter

Next, I installed numpy, scipy, and matplotib.

pip install numpy scipy matplotlib

Next, I tried to install cirq.

pip install cirq

Then, the cirq installation process tried to downgrade attr and jsonschema, and it conflict with jupyter.

Installing collected packages: sortedcontainers, rfc3986, rfc3339, 
pytz, msgpack, mpmath, lark, urllib3, tzdata, typing-extensions, tqdm, 
toml, sympy, ruamel.yaml.clib, retrying, python-rapidjson, pyrsistent, 
PyJWT, pyasn1, py, protobuf, networkx, iso8601, h11, grpcio, duet, 
cachetools, attrs, ruamel.yaml, rsa, retry, pydantic, pyasn1-modules,
 proto-plus, pandas, jsonschema, httpcore, googleapis-common-protos, 
rpcq, httpx, grpcio-status, google-auth, cirq-core, qcs-api-client, 
google-api-core, cirq-web, cirq-pasqal, cirq-ionq, cirq-aqt, pyquil, 
cirq-rigetti, cirq-google, cirq-ft, cirq
   Attempting uninstall: urllib3
     Found existing installation: urllib3 2.0.4
     Uninstalling urllib3-2.0.4:
       Successfully uninstalled urllib3-2.0.4
   Attempting uninstall: attrs
     Found existing installation: attrs 23.1.0
     Uninstalling attrs-23.1.0:
       Successfully uninstalled attrs-23.1.0
   Attempting uninstall: jsonschema
     Found existing installation: jsonschema 4.19.0
     Uninstalling jsonschema-4.19.0:
       Successfully uninstalled jsonschema-4.19.0 
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. jupyterlab-server 2.25.0 requires 
jsonschema>=4.18.0, but you have jsonschema 4.17.3 which is 
incompatible. jupyter-events 0.7.0 requires jsonschema[format-nongpl]>=4.18.0, but you have jsonschema 4.17.3 which is incompatible. 
referencing 0.30.2 requires attrs>=22.2.0, but you have attrs 21.4.0 
which is incompatible.
Successfully installed PyJWT-2.8.0 attrs-21.4.0 cachetools-5.3.1 cirq-
1.2.0 cirq-aqt-1.2.0 cirq-core-1.2.0 cirq-ft-1.2.0 cirq-google-1.2.0 
cirq-ionq-1.2.0 cirq-pasqal-1.2.0 cirq-rigetti-1.2.0 cirq-web-1.2.0 
duet-0.2.9 google-api-core-2.11.1 google-auth-2.23.0 googleapis-common-
protos-1.60.0 grpcio-1.58.0 grpcio-status-1.58.0 h11-0.14.0 httpcore-
0.16.3 httpx-0.23.3 iso8601-1.1.0 jsonschema-4.17.3 lark-0.11.3 mpmath-
1.3.0 msgpack-1.0.5 networkx-2.8.8 pandas-2.1.0 proto-plus-1.22.3 
protobuf-4.24.3 py-1.11.0 pyasn1-0.5.0 pyasn1-modules-0.3.0 pydantic-
1.10.12 pyquil-3.2.1 pyrsistent-0.19.3 python-rapidjson-1.11 pytz-
2023.3.post1 qcs-api-client-0.21.6 retry-0.9.2 retrying-1.3.4 rfc3339-
6.2 rfc3986-1.5.0 rpcq-3.11.0 rsa-4.9 ruamel.yaml-0.17.32 
ruamel.yaml.clib-0.2.7 sortedcontainers-2.4.0 sympy-1.12 toml-0.10.2 
tqdm-4.66.1 typing-extensions-4.7.1 tzdata-2023.3 urllib3-1.26.16

How to install cirq and jupyter when they require different versions of libraries?

I tried to downgrade by hand, but jupyter banned it.

0

There are 0 best solutions below