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

pytest . fails to find cirq module after setting up Cirq dev environment #5713

Closed
mhucka opened this issue Jul 11, 2022 · 13 comments
Closed
Labels
area/install kind/bug-report Something doesn't seem to work. triage/accepted there is consensus amongst maintainers that this is a real bug or a reasonable feature to add

Comments

@mhucka
Copy link
Contributor

mhucka commented Jul 11, 2022

Description of the issue

The instructions at https://quantumai.google/cirq/dev/development#setting_up_an_environment describe how to set up how to clone the repo, install dependencies, set up a virtual environment, and then (in step 4) run pytest . from the Cirq subdirectory. When I do this in a relatively plain installation of Ubuntu 20.04 (which is based on Debian), it produces the following error:

ubuntu20:Cirq> pytest .
================================================================== test session starts ==================================================================
platform linux -- Python 3.8.10, pytest-7.1.2, pluggy-1.0.0
rootdir: /home/mhucka/Cirq
plugins: forked-1.4.0, asyncio-0.18.3, cov-3.0.0, xdist-2.2.1
asyncio: mode=legacy
collected 0 items / 1 error                                                                                                                             

======================================================================== ERRORS =========================================================================
_____________________________________________________________ ERROR collecting test session _____________________________________________________________
/usr/lib/python3.8/importlib/__init__.py:127: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
<frozen importlib._bootstrap>:1014: in _gcd_import
    ???
<frozen importlib._bootstrap>:991: in _find_and_load
    ???
<frozen importlib._bootstrap>:961: in _find_and_load_unlocked
    ???
<frozen importlib._bootstrap>:219: in _call_with_frames_removed
    ???
<frozen importlib._bootstrap>:1014: in _gcd_import
    ???
<frozen importlib._bootstrap>:991: in _find_and_load
    ???
<frozen importlib._bootstrap>:975: in _find_and_load_unlocked
    ???
<frozen importlib._bootstrap>:671: in _load_unlocked
    ???
<frozen importlib._bootstrap_external>:848: in exec_module
    ???
<frozen importlib._bootstrap>:219: in _call_with_frames_removed
    ???
cirq-aqt/cirq_aqt/__init__.py:19: in <module>
    from cirq_aqt.aqt_sampler import AQTSampler, AQTSamplerLocalSimulator
cirq-aqt/cirq_aqt/aqt_sampler.py:33: in <module>
    import cirq
E   ModuleNotFoundError: No module named 'cirq'
=================================================================== warnings summary ====================================================================
../.virtualenvs/cirq-py3/lib/python3.8/site-packages/pytest_asyncio/plugin.py:191
  /home/mhucka/.virtualenvs/cirq-py3/lib/python3.8/site-packages/pytest_asyncio/plugin.py:191: DeprecationWarning: The 'asyncio_mode' default value will change to 'strict' in future, please explicitly use 'asyncio_mode=strict' or 'asyncio_mode=auto' in pytest configuration file.
    config.issue_config_time_warning(LEGACY_MODE, stacklevel=2)

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
================================================================ short test summary info ================================================================
ERROR  - ModuleNotFoundError: No module named 'cirq'
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Interrupted: 1 error during collection !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
============================================================== 1 warning, 1 error in 0.14s ==============================================================

I realize that Ubuntu is not straight Debian, and the instructions do say they're intended for Debian. However, the same error happens when I try everything in a completely different Python environment (namely on my regular macOS 10.15.6 machine, with a Python 3.9 installed using HomeBrew and virtualenv to create the necessary virtual environment), which suggests this is probably not due to Ubuntu vs straight Debian but rather a real underlying problem.

How to reproduce the issue

I followed the instructions at https://quantumai.google/cirq/dev/development as closely as possible to use a fresh clone of the current Cirq repo, a relatively clean Ubuntu 20.04 VM running in Parallels on macOS (I say "relatively clean" because I had to install things like curl, emacs, and a few other thing on top of the vanilla Ubuntu 20.04, to make it usable for me). Referring to the steps 1-4 described at https://quantumai.google/cirq/dev/development#setting_up_an_environment, if I follow them through, upon step 4,

pytest .

the error described above occurs. For reference, the folded details section below contains an entire trace of what happens for steps 3 and 4.

ubuntu20:Cirq> mkvirtualenv cirq-py3 --python=/usr/bin/python3
created virtual environment CPython3.8.10.final.0-64 in 140ms
  creator CPython3Posix(dest=/home/mhucka/.virtualenvs/cirq-py3, clear=False, global=False)
  seeder FromAppData(download=False, pip=latest, setuptools=latest, wheel=latest, pkg_resources=latest, via=copy, app_data_dir=/home/mhucka/.local/share/virtualenv/seed-app-data/v1.0.1.debian.1)
  activators BashActivator,CShellActivator,FishActivator,PowerShellActivator,PythonActivator,XonshActivator
virtualenvwrapper.user_scripts creating /home/mhucka/.virtualenvs/cirq-py3/bin/predeactivate
virtualenvwrapper.user_scripts creating /home/mhucka/.virtualenvs/cirq-py3/bin/postdeactivate
virtualenvwrapper.user_scripts creating /home/mhucka/.virtualenvs/cirq-py3/bin/preactivate
virtualenvwrapper.user_scripts creating /home/mhucka/.virtualenvs/cirq-py3/bin/postactivate
virtualenvwrapper.user_scripts creating /home/mhucka/.virtualenvs/cirq-py3/bin/get_env_details
ubuntu20:Cirq> workon cirq-py3
ubuntu20:Cirq> python -V
Python 3.8.10
ubuntu20:Cirq> python -m pip install --upgrade pip
Collecting pip
  Downloading pip-22.1.2-py3-none-any.whl (2.1 MB)
     |████████████████████████████████| 2.1 MB 2.2 MB/s 
Installing collected packages: pip
  Attempting uninstall: pip
    Found existing installation: pip 20.0.2
    Uninstalling pip-20.0.2:
      Successfully uninstalled pip-20.0.2
Successfully installed pip-22.1.2
ubuntu20:Cirq> python -m pip install -r dev_tools/requirements/dev.env.txt 
Ignoring backports.cached_property: markers 'python_version < "3.8"' don't match your environment
Ignoring pyquil: markers 'python_version < "3.7"' don't match your environment
Ignoring ipython: markers 'python_version < "3.7"' don't match your environment
Collecting tensorflow-docs@ git+https://github.com/tensorflow/docs@3a6a7a3322de8620f0031ae3a0a4b62e40d1d7f2
  Cloning https://github.com/tensorflow/docs (to revision 3a6a7a3322de8620f0031ae3a0a4b62e40d1d7f2) to /tmp/pip-install-8xw35o1f/tensorflow-docs_8cd6799b02604fe5a5dcf337d319db2a
  Running command git clone --filter=blob:none --quiet https://github.com/tensorflow/docs /tmp/pip-install-8xw35o1f/tensorflow-docs_8cd6799b02604fe5a5dcf337d319db2a
  warning: templates not found in /home/mhucka/.config/git/template
  Running command git rev-parse -q --verify 'sha^3a6a7a3322de8620f0031ae3a0a4b62e40d1d7f2'
  Running command git fetch -q https://github.com/tensorflow/docs 3a6a7a3322de8620f0031ae3a0a4b62e40d1d7f2
  Running command git checkout -q 3a6a7a3322de8620f0031ae3a0a4b62e40d1d7f2
  Resolved https://github.com/tensorflow/docs to commit 3a6a7a3322de8620f0031ae3a0a4b62e40d1d7f2
  Preparing metadata (setup.py) ... done
Collecting requests~=2.18
  Downloading requests-2.28.1-py3-none-any.whl (62 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 62.8/62.8 kB 1.1 MB/s eta 0:00:00
Collecting duet~=0.2.6
  Downloading duet-0.2.7-py3-none-any.whl (28 kB)
Collecting matplotlib~=3.0
  Downloading matplotlib-3.5.2-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.whl (11.3 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 11.3/11.3 MB 17.4 MB/s eta 0:00:00
Collecting networkx~=2.4
  Downloading networkx-2.8.4-py3-none-any.whl (2.0 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 2.0/2.0 MB 20.1 MB/s eta 0:00:00
Collecting numpy~=1.16
  Downloading numpy-1.23.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (17.1 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 17.1/17.1 MB 19.6 MB/s eta 0:00:00
Collecting pandas
  Downloading pandas-1.4.3-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (11.7 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 11.7/11.7 MB 20.8 MB/s eta 0:00:00
Collecting sortedcontainers~=2.0
  Downloading sortedcontainers-2.4.0-py2.py3-none-any.whl (29 kB)
Collecting scipy
  Downloading scipy-1.8.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (41.6 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 41.6/41.6 MB 15.3 MB/s eta 0:00:00
Collecting sympy
  Downloading sympy-1.10.1-py3-none-any.whl (6.4 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 6.4/6.4 MB 17.9 MB/s eta 0:00:00
Collecting typing_extensions
  Downloading typing_extensions-4.3.0-py3-none-any.whl (25 kB)
Collecting tqdm
  Downloading tqdm-4.64.0-py2.py3-none-any.whl (78 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 78.4/78.4 kB 26.3 MB/s eta 0:00:00
Collecting google-api-core[grpc]<2.0.0dev,>=1.14.0
  Downloading google_api_core-1.31.6-py2.py3-none-any.whl (93 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 93.3/93.3 kB 23.2 MB/s eta 0:00:00
Collecting proto-plus>=1.20.0
  Downloading proto_plus-1.20.6-py3-none-any.whl (46 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 46.4/46.4 kB 24.7 MB/s eta 0:00:00
Collecting protobuf<4,>=3.13.0
  Downloading protobuf-3.20.1-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.whl (1.0 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.0/1.0 MB 18.8 MB/s eta 0:00:00
Collecting attrs~=20.3.0
  Downloading attrs-20.3.0-py2.py3-none-any.whl (49 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 49.3/49.3 kB 20.3 MB/s eta 0:00:00
Collecting certifi~=2021.5.30
  Downloading certifi-2021.5.30-py2.py3-none-any.whl (145 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 145.5/145.5 kB 25.3 MB/s eta 0:00:00
Collecting h11~=0.9.0
  Downloading h11-0.9.0-py2.py3-none-any.whl (53 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 53.6/53.6 kB 25.1 MB/s eta 0:00:00
Collecting httpcore~=0.11.1
  Downloading httpcore-0.11.1-py3-none-any.whl (52 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 52.8/52.8 kB 21.3 MB/s eta 0:00:00
Collecting httpx~=0.15.5
  Downloading httpx-0.15.5-py3-none-any.whl (65 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 65.1/65.1 kB 20.8 MB/s eta 0:00:00
Collecting idna~=2.10
  Downloading idna-2.10-py2.py3-none-any.whl (58 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 58.8/58.8 kB 19.1 MB/s eta 0:00:00
Collecting iso8601~=0.1.14
  Downloading iso8601-0.1.16-py2.py3-none-any.whl (10 kB)
Collecting pydantic~=1.8.2
  Downloading pydantic-1.8.2-cp38-cp38-manylinux2014_x86_64.whl (13.7 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 13.7/13.7 MB 18.1 MB/s eta 0:00:00
Collecting pyjwt~=1.7.1
  Downloading PyJWT-1.7.1-py2.py3-none-any.whl (18 kB)
Collecting pyquil~=3.0.0
  Downloading pyquil-3.0.1-py3-none-any.whl (220 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 220.7/220.7 kB 22.2 MB/s eta 0:00:00
Collecting python-dateutil~=2.8.1
  Downloading python_dateutil-2.8.2-py2.py3-none-any.whl (247 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 247.7/247.7 kB 21.5 MB/s eta 0:00:00
Collecting qcs-api-client~=0.8.0
  Downloading qcs_api_client-0.8.0-py3-none-any.whl (97 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 97.3/97.3 kB 17.1 MB/s eta 0:00:00
Collecting retrying~=1.3.3
  Downloading retrying-1.3.3.tar.gz (10 kB)
  Preparing metadata (setup.py) ... done
Collecting rfc3339~=6.2
  Downloading rfc3339-6.2-py3-none-any.whl (5.5 kB)
Collecting rfc3986~=1.5.0
  Downloading rfc3986-1.5.0-py2.py3-none-any.whl (31 kB)
Collecting six~=1.16.0
  Downloading six-1.16.0-py2.py3-none-any.whl (11 kB)
Collecting sniffio~=1.2.0
  Downloading sniffio-1.2.0-py3-none-any.whl (10 kB)
Collecting toml~=0.10.2
  Downloading toml-0.10.2-py2.py3-none-any.whl (16 kB)
Collecting ply>=3.4
  Downloading ply-3.11-py2.py3-none-any.whl (49 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 49.6/49.6 kB 24.3 MB/s eta 0:00:00
Collecting pylatex~=1.3.0
  Downloading PyLaTeX-1.3.4.tar.gz (84 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 84.1/84.1 kB 23.5 MB/s eta 0:00:00
  Preparing metadata (setup.py) ... done
Collecting quimb
  Downloading quimb-1.4.0-py3-none-any.whl (353 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 353.6/353.6 kB 22.6 MB/s eta 0:00:00
Collecting opt_einsum
  Downloading opt_einsum-3.3.0-py3-none-any.whl (65 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 65.5/65.5 kB 21.8 MB/s eta 0:00:00
Collecting autoray
  Downloading autoray-0.3.2-py3-none-any.whl (36 kB)
Collecting numba>=0.53.0
  Downloading numba-0.55.2-cp38-cp38-manylinux2014_x86_64.manylinux_2_17_x86_64.whl (3.4 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 3.4/3.4 MB 18.7 MB/s eta 0:00:00
Collecting mypy~=0.782.0
  Downloading mypy-0.782-cp38-cp38-manylinux1_x86_64.whl (21.7 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 21.7/21.7 MB 17.8 MB/s eta 0:00:00
Collecting pytest
  Downloading pytest-7.1.2-py3-none-any.whl (297 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 297.0/297.0 kB 20.1 MB/s eta 0:00:00
Collecting pytest-asyncio
  Downloading pytest_asyncio-0.18.3-1-py3-none-any.whl (14 kB)
Collecting pytest-cov
  Downloading pytest_cov-3.0.0-py3-none-any.whl (20 kB)
Collecting coverage<=6.2
  Downloading coverage-6.2-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl (217 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 217.1/217.1 kB 24.3 MB/s eta 0:00:00
Collecting pytest-xdist~=2.2.0
  Downloading pytest_xdist-2.2.1-py3-none-any.whl (37 kB)
Collecting filelock~=3.0.12
  Downloading filelock-3.0.12-py3-none-any.whl (7.6 kB)
Collecting freezegun~=0.3.15
  Downloading freezegun-0.3.15-py2.py3-none-any.whl (14 kB)
Collecting importlib-metadata
  Downloading importlib_metadata-4.12.0-py3-none-any.whl (21 kB)
Collecting codeowners
  Downloading codeowners-0.5.0-py3-none-any.whl (8.2 kB)
Collecting virtualenv
  Downloading virtualenv-20.15.1-py2.py3-none-any.whl (10.1 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 10.1/10.1 MB 19.1 MB/s eta 0:00:00
Collecting virtualenv-clone
  Downloading virtualenv_clone-0.5.7-py3-none-any.whl (6.6 kB)
Collecting flynt~=0.60
  Downloading flynt-0.76-py3-none-any.whl (29 kB)
Collecting black==22.3.0
  Downloading black-22.3.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.5 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.5/1.5 MB 19.1 MB/s eta 0:00:00
Collecting pylint~=2.13.0
  Downloading pylint-2.13.9-py3-none-any.whl (438 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 438.5/438.5 kB 20.3 MB/s eta 0:00:00
Collecting dill==0.3.4
  Downloading dill-0.3.4-py2.py3-none-any.whl (86 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 86.9/86.9 kB 15.3 MB/s eta 0:00:00
Collecting grpcio-tools~=1.34.1
  Downloading grpcio_tools-1.34.1-cp38-cp38-manylinux2014_x86_64.whl (2.5 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 2.5/2.5 MB 20.0 MB/s eta 0:00:00
Collecting mypy-protobuf==1.10
  Downloading mypy-protobuf-1.10.tar.gz (5.4 kB)
  Preparing metadata (setup.py) ... done
Collecting ipython==7.31.1
  Downloading ipython-7.31.1-py3-none-any.whl (792 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 792.3/792.3 kB 20.8 MB/s eta 0:00:00
Collecting notebook<=6.4.7,>=6.4.1
  Downloading notebook-6.4.7-py3-none-any.whl (9.9 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 9.9/9.9 MB 19.1 MB/s eta 0:00:00
Collecting ipykernel==5.3.4
  Downloading ipykernel-5.3.4-py3-none-any.whl (120 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 120.6/120.6 kB 21.5 MB/s eta 0:00:00
Collecting papermill~=2.3.2
  Downloading papermill-2.3.4-py3-none-any.whl (37 kB)
Collecting seaborn~=0.11.1
  Downloading seaborn-0.11.2-py3-none-any.whl (292 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 292.8/292.8 kB 20.9 MB/s eta 0:00:00
Requirement already satisfied: setuptools in /home/mhucka/.virtualenvs/cirq-py3/lib/python3.8/site-packages (from -r dev_tools/requirements/deps/packaging.txt (line 5)) (44.0.0)
Requirement already satisfied: wheel in /home/mhucka/.virtualenvs/cirq-py3/lib/python3.8/site-packages (from -r dev_tools/requirements/deps/packaging.txt (line 6)) (0.34.2)
Collecting twine
  Downloading twine-4.0.1-py3-none-any.whl (36 kB)
Collecting asv
  Downloading asv-0.5.1.tar.gz (487 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 487.2/487.2 kB 20.8 MB/s eta 0:00:00
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Collecting qiskit-aer~=0.10.4
  Downloading qiskit_aer-0.10.4-cp38-cp38-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (18.0 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 18.0/18.0 MB 18.9 MB/s eta 0:00:00
Collecting rstcheck~=3.3.1
  Downloading rstcheck-3.3.1.tar.gz (13 kB)
  Preparing metadata (setup.py) ... done
Collecting tomli>=1.1.0
  Downloading tomli-2.0.1-py3-none-any.whl (12 kB)
Collecting click>=8.0.0
  Downloading click-8.1.3-py3-none-any.whl (96 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 96.6/96.6 kB 25.6 MB/s eta 0:00:00
Collecting pathspec>=0.9.0
  Downloading pathspec-0.9.0-py2.py3-none-any.whl (31 kB)
Collecting platformdirs>=2
  Downloading platformdirs-2.5.2-py3-none-any.whl (14 kB)
Collecting mypy-extensions>=0.4.3
  Downloading mypy_extensions-0.4.3-py2.py3-none-any.whl (4.5 kB)
Collecting pygments
  Downloading Pygments-2.12.0-py3-none-any.whl (1.1 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.1/1.1 MB 19.6 MB/s eta 0:00:00
Collecting pickleshare
  Downloading pickleshare-0.7.5-py2.py3-none-any.whl (6.9 kB)
Collecting prompt-toolkit!=3.0.0,!=3.0.1,<3.1.0,>=2.0.0
  Downloading prompt_toolkit-3.0.30-py3-none-any.whl (381 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 381.7/381.7 kB 26.3 MB/s eta 0:00:00
Collecting backcall
  Downloading backcall-0.2.0-py2.py3-none-any.whl (11 kB)
Collecting traitlets>=4.2
  Downloading traitlets-5.3.0-py3-none-any.whl (106 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 106.8/106.8 kB 26.7 MB/s eta 0:00:00
Collecting matplotlib-inline
  Downloading matplotlib_inline-0.1.3-py3-none-any.whl (8.2 kB)
Collecting decorator
  Downloading decorator-5.1.1-py3-none-any.whl (9.1 kB)
Collecting pexpect>4.3
  Downloading pexpect-4.8.0-py2.py3-none-any.whl (59 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 59.0/59.0 kB 15.0 MB/s eta 0:00:00
Collecting jedi>=0.16
  Downloading jedi-0.18.1-py2.py3-none-any.whl (1.6 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.6/1.6 MB 19.6 MB/s eta 0:00:00
Collecting tornado>=4.2
  Downloading tornado-6.2-cp37-abi3-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (423 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 424.0/424.0 kB 22.3 MB/s eta 0:00:00
Collecting jupyter-client
  Downloading jupyter_client-7.3.4-py3-none-any.whl (132 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 132.1/132.1 kB 24.5 MB/s eta 0:00:00
Collecting urllib3<1.27,>=1.21.1
  Downloading urllib3-1.26.10-py2.py3-none-any.whl (139 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 139.2/139.2 kB 23.1 MB/s eta 0:00:00
Collecting charset-normalizer<3,>=2
  Downloading charset_normalizer-2.1.0-py3-none-any.whl (39 kB)
Collecting fonttools>=4.22.0
  Downloading fonttools-4.34.4-py3-none-any.whl (944 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 944.1/944.1 kB 22.0 MB/s eta 0:00:00
Collecting kiwisolver>=1.0.1
  Downloading kiwisolver-1.4.3-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.whl (1.2 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.2/1.2 MB 21.1 MB/s eta 0:00:00
Collecting pillow>=6.2.0
  Downloading Pillow-9.2.0-cp38-cp38-manylinux_2_28_x86_64.whl (3.2 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 3.2/3.2 MB 19.3 MB/s eta 0:00:00
Collecting pyparsing>=2.2.1
  Downloading pyparsing-3.0.9-py3-none-any.whl (98 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 98.3/98.3 kB 21.6 MB/s eta 0:00:00
Collecting cycler>=0.10
  Downloading cycler-0.11.0-py3-none-any.whl (6.4 kB)
Collecting packaging>=20.0
  Downloading packaging-21.3-py3-none-any.whl (40 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 40.8/40.8 kB 13.7 MB/s eta 0:00:00
Collecting pytz>=2020.1
  Downloading pytz-2022.1-py2.py3-none-any.whl (503 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 503.5/503.5 kB 22.4 MB/s eta 0:00:00
Collecting mpmath>=0.19
  Downloading mpmath-1.2.1-py3-none-any.whl (532 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 532.6/532.6 kB 21.4 MB/s eta 0:00:00
Collecting googleapis-common-protos<2.0dev,>=1.6.0
  Downloading googleapis_common_protos-1.56.3-py2.py3-none-any.whl (211 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 211.8/211.8 kB 22.9 MB/s eta 0:00:00
Collecting google-auth<2.0dev,>=1.25.0
  Downloading google_auth-1.35.0-py2.py3-none-any.whl (152 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 152.9/152.9 kB 24.4 MB/s eta 0:00:00
Collecting grpcio<2.0dev,>=1.29.0
  Downloading grpcio-1.47.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (4.5 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 4.5/4.5 MB 19.5 MB/s eta 0:00:00
Collecting lark<0.12.0,>=0.11.1
  Downloading lark-0.11.3.tar.gz (229 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 229.9/229.9 kB 25.4 MB/s eta 0:00:00
  Preparing metadata (setup.py) ... done
Collecting retry<0.10.0,>=0.9.2
  Downloading retry-0.9.2-py2.py3-none-any.whl (8.0 kB)
Collecting rpcq<4.0.0,>=3.6.0
  Downloading rpcq-3.10.0.tar.gz (44 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 44.7/44.7 kB 20.1 MB/s eta 0:00:00
  Preparing metadata (setup.py) ... done
Collecting ordered-set
  Downloading ordered_set-4.1.0-py3-none-any.whl (7.6 kB)
Collecting psutil>=4.3.1
  Downloading psutil-5.9.1-cp38-cp38-manylinux_2_12_x86_64.manylinux2010_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (284 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 284.7/284.7 kB 21.7 MB/s eta 0:00:00
Collecting cytoolz>=0.8.0
  Downloading cytoolz-0.12.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.8 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.8/1.8 MB 20.6 MB/s eta 0:00:00
Collecting numpy~=1.16
  Downloading numpy-1.22.4-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (16.9 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 16.9/16.9 MB 18.6 MB/s eta 0:00:00
Collecting llvmlite<0.39,>=0.38.0rc1
  Downloading llvmlite-0.38.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (34.5 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 34.5/34.5 MB 16.9 MB/s eta 0:00:00
Collecting typed-ast<1.5.0,>=1.4.0
  Downloading typed_ast-1.4.3-cp38-cp38-manylinux1_x86_64.whl (774 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 774.0/774.0 kB 21.9 MB/s eta 0:00:00
Collecting pluggy<2.0,>=0.12
  Downloading pluggy-1.0.0-py2.py3-none-any.whl (13 kB)
Collecting py>=1.8.2
  Downloading py-1.11.0-py2.py3-none-any.whl (98 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 98.7/98.7 kB 25.0 MB/s eta 0:00:00
Collecting iniconfig
  Downloading iniconfig-1.1.1-py2.py3-none-any.whl (5.0 kB)
Collecting coverage[toml]>=5.2.1
  Downloading coverage-6.4.1-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (213 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 213.3/213.3 kB 19.4 MB/s eta 0:00:00
Collecting pytest-forked
  Downloading pytest_forked-1.4.0-py3-none-any.whl (4.9 kB)
Collecting execnet>=1.1
  Downloading execnet-1.9.0-py2.py3-none-any.whl (39 kB)
Collecting zipp>=0.5
  Downloading zipp-3.8.0-py3-none-any.whl (5.4 kB)
Collecting virtualenv
  Downloading virtualenv-20.15.0-py2.py3-none-any.whl (10.1 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 10.1/10.1 MB 19.4 MB/s eta 0:00:00
  Downloading virtualenv-20.14.1-py2.py3-none-any.whl (8.8 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 8.8/8.8 MB 19.8 MB/s eta 0:00:00
  Downloading virtualenv-20.14.0-py2.py3-none-any.whl (8.8 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 8.8/8.8 MB 19.6 MB/s eta 0:00:00
  Downloading virtualenv-20.13.4-py2.py3-none-any.whl (8.7 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 8.7/8.7 MB 20.0 MB/s eta 0:00:00
  Downloading virtualenv-20.13.3-py2.py3-none-any.whl (8.7 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 8.7/8.7 MB 20.1 MB/s eta 0:00:00
  Downloading virtualenv-20.13.2-py2.py3-none-any.whl (8.7 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 8.7/8.7 MB 20.4 MB/s eta 0:00:00
  Downloading virtualenv-20.13.1-py2.py3-none-any.whl (8.6 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 8.6/8.6 MB 20.3 MB/s eta 0:00:00
  Downloading virtualenv-20.13.0-py2.py3-none-any.whl (6.5 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 6.5/6.5 MB 20.6 MB/s eta 0:00:00
  Downloading virtualenv-20.12.1-py2.py3-none-any.whl (6.5 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 6.5/6.5 MB 20.6 MB/s eta 0:00:00
  Downloading virtualenv-20.12.0-py2.py3-none-any.whl (6.5 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 6.5/6.5 MB 20.7 MB/s eta 0:00:00
  Downloading virtualenv-20.11.2-py2.py3-none-any.whl (6.5 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 6.5/6.5 MB 21.0 MB/s eta 0:00:00
  Downloading virtualenv-20.11.1-py2.py3-none-any.whl (6.5 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 6.5/6.5 MB 20.8 MB/s eta 0:00:00
  Downloading virtualenv-20.11.0-py2.py3-none-any.whl (6.5 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 6.5/6.5 MB 21.3 MB/s eta 0:00:00
  Downloading virtualenv-20.10.0-py2.py3-none-any.whl (5.6 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 5.6/5.6 MB 21.0 MB/s eta 0:00:00
Collecting distlib<1,>=0.3.1
  Downloading distlib-0.3.4-py2.py3-none-any.whl (461 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 461.2/461.2 kB 21.4 MB/s eta 0:00:00
Collecting virtualenv
  Downloading virtualenv-20.9.0-py2.py3-none-any.whl (5.6 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 5.6/5.6 MB 21.7 MB/s eta 0:00:00
  Downloading virtualenv-20.8.1-py2.py3-none-any.whl (5.3 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 5.3/5.3 MB 21.7 MB/s eta 0:00:00
Collecting backports.entry-points-selectable>=1.0.4
  Downloading backports.entry_points_selectable-1.1.1-py2.py3-none-any.whl (6.2 kB)
Collecting astor
  Downloading astor-0.8.1-py2.py3-none-any.whl (27 kB)
Collecting mccabe<0.8,>=0.6
  Downloading mccabe-0.7.0-py2.py3-none-any.whl (7.3 kB)
Collecting astroid<=2.12.0-dev0,>=2.11.5
  Downloading astroid-2.11.7-py3-none-any.whl (251 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 251.2/251.2 kB 19.9 MB/s eta 0:00:00
Collecting isort<6,>=4.2.5
  Downloading isort-5.10.1-py3-none-any.whl (103 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 103.4/103.4 kB 29.4 MB/s eta 0:00:00
Collecting ipython-genutils
  Downloading ipython_genutils-0.2.0-py2.py3-none-any.whl (26 kB)
Collecting prometheus-client
  Downloading prometheus_client-0.14.1-py3-none-any.whl (59 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 59.5/59.5 kB 14.0 MB/s eta 0:00:00
Collecting nbformat
  Downloading nbformat-5.4.0-py3-none-any.whl (73 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 73.3/73.3 kB 25.1 MB/s eta 0:00:00
Collecting jupyter-core>=4.6.1
  Downloading jupyter_core-4.11.1-py3-none-any.whl (88 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 88.4/88.4 kB 21.2 MB/s eta 0:00:00
Collecting Send2Trash>=1.8.0
  Downloading Send2Trash-1.8.0-py3-none-any.whl (18 kB)
Collecting terminado>=0.8.3
  Downloading terminado-0.15.0-py3-none-any.whl (16 kB)
Collecting argon2-cffi
  Downloading argon2_cffi-21.3.0-py3-none-any.whl (14 kB)
Collecting jinja2
  Downloading Jinja2-3.1.2-py3-none-any.whl (133 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 133.1/133.1 kB 24.5 MB/s eta 0:00:00
Collecting nest-asyncio>=1.5
  Downloading nest_asyncio-1.5.5-py3-none-any.whl (5.2 kB)
Collecting nbconvert
  Downloading nbconvert-6.5.0-py3-none-any.whl (561 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 561.6/561.6 kB 21.1 MB/s eta 0:00:00
Collecting pyzmq>=17
  Downloading pyzmq-23.2.0-cp38-cp38-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (1.1 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.1/1.1 MB 21.4 MB/s eta 0:00:00
Collecting ansiwrap
  Downloading ansiwrap-0.8.4-py2.py3-none-any.whl (8.5 kB)
Collecting pyyaml
  Downloading PyYAML-6.0-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl (701 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 701.2/701.2 kB 22.0 MB/s eta 0:00:00
Collecting tenacity
  Downloading tenacity-8.0.1-py3-none-any.whl (24 kB)
Collecting nbclient>=0.2.0
  Downloading nbclient-0.6.6-py3-none-any.whl (71 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 71.8/71.8 kB 27.3 MB/s eta 0:00:00
Collecting entrypoints
  Downloading entrypoints-0.4-py3-none-any.whl (5.3 kB)
Collecting absl-py
  Downloading absl_py-1.1.0-py3-none-any.whl (123 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 123.7/123.7 kB 18.7 MB/s eta 0:00:00
Collecting requests-toolbelt!=0.9.0,>=0.8.0
  Downloading requests_toolbelt-0.9.1-py2.py3-none-any.whl (54 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 54.3/54.3 kB 28.8 MB/s eta 0:00:00
Collecting readme-renderer>=35.0
  Downloading readme_renderer-35.0-py3-none-any.whl (14 kB)
Collecting pkginfo>=1.8.1
  Downloading pkginfo-1.8.3-py2.py3-none-any.whl (26 kB)
Collecting keyring>=15.1
  Downloading keyring-23.6.0-py3-none-any.whl (34 kB)
Collecting rich>=12.0.0
  Downloading rich-12.4.4-py3-none-any.whl (232 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 232.0/232.0 kB 24.1 MB/s eta 0:00:00
Collecting qiskit-terra>=0.19.1
  Downloading qiskit_terra-0.21.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (6.7 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 6.7/6.7 MB 21.4 MB/s eta 0:00:00
Collecting docutils>=0.7
  Downloading docutils-0.19-py3-none-any.whl (570 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 570.5/570.5 kB 22.8 MB/s eta 0:00:00
Collecting lazy-object-proxy>=1.4.0
  Downloading lazy_object_proxy-1.7.1-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (60 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 60.5/60.5 kB 23.8 MB/s eta 0:00:00
Collecting wrapt<2,>=1.11
  Downloading wrapt-1.14.1-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (81 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 81.0/81.0 kB 24.8 MB/s eta 0:00:00
Collecting coverage[toml]>=5.2.1
  Downloading coverage-6.4-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (212 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 212.9/212.9 kB 22.8 MB/s eta 0:00:00
  Downloading coverage-6.3.3-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (212 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 212.2/212.2 kB 28.1 MB/s eta 0:00:00
  Downloading coverage-6.3.2-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (212 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 212.2/212.2 kB 21.6 MB/s eta 0:00:00
  Downloading coverage-6.3.1-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (211 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 211.7/211.7 kB 19.9 MB/s eta 0:00:00
  Downloading coverage-6.3-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (211 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 211.5/211.5 kB 5.1 MB/s eta 0:00:00
Collecting toolz>=0.8.0
  Downloading toolz-0.12.0-py3-none-any.whl (55 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 55.8/55.8 kB 26.9 MB/s eta 0:00:00
Collecting rsa<5,>=3.1.4
  Downloading rsa-4.8-py3-none-any.whl (39 kB)
Collecting pyasn1-modules>=0.2.1
  Downloading pyasn1_modules-0.2.8-py2.py3-none-any.whl (155 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 155.3/155.3 kB 20.1 MB/s eta 0:00:00
Collecting cachetools<5.0,>=2.0.0
  Downloading cachetools-4.2.4-py3-none-any.whl (10 kB)
Collecting parso<0.9.0,>=0.8.0
  Downloading parso-0.8.3-py2.py3-none-any.whl (100 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 100.8/100.8 kB 34.1 MB/s eta 0:00:00
Collecting jeepney>=0.4.2
  Downloading jeepney-0.8.0-py3-none-any.whl (48 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 48.4/48.4 kB 25.3 MB/s eta 0:00:00
Collecting SecretStorage>=3.2
  Downloading SecretStorage-3.3.2-py3-none-any.whl (15 kB)
Collecting fastjsonschema
  Downloading fastjsonschema-2.15.3-py3-none-any.whl (22 kB)
Collecting jsonschema>=2.6
  Downloading jsonschema-4.6.2-py3-none-any.whl (80 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 80.8/80.8 kB 18.1 MB/s eta 0:00:00
Collecting ptyprocess>=0.5
  Downloading ptyprocess-0.7.0-py2.py3-none-any.whl (13 kB)
Collecting wcwidth
  Downloading wcwidth-0.2.5-py2.py3-none-any.whl (30 kB)
Collecting stevedore>=3.0.0
  Downloading stevedore-3.5.0-py3-none-any.whl (49 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 49.7/49.7 kB 19.7 MB/s eta 0:00:00
Collecting tweedledum<2.0,>=1.1
  Downloading tweedledum-1.1.1-cp38-cp38-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (929 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 929.9/929.9 kB 21.0 MB/s eta 0:00:00
Collecting retworkx>=0.11.0
  Downloading retworkx-0.11.0-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl (1.6 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.6/1.6 MB 20.9 MB/s eta 0:00:00
Collecting symengine>=0.9
  Downloading symengine-0.9.2-cp38-cp38-manylinux2010_x86_64.whl (37.5 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 37.5/37.5 MB 17.0 MB/s eta 0:00:00
Collecting bleach>=2.1.0
  Downloading bleach-5.0.1-py3-none-any.whl (160 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 160.9/160.9 kB 23.1 MB/s eta 0:00:00
Collecting commonmark<0.10.0,>=0.9.0
  Downloading commonmark-0.9.1-py2.py3-none-any.whl (51 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 51.1/51.1 kB 20.9 MB/s eta 0:00:00
Collecting msgpack<1.0,>=0.6
  Downloading msgpack-0.6.2.tar.gz (119 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 119.1/119.1 kB 20.8 MB/s eta 0:00:00
  Preparing metadata (setup.py) ... done
Collecting python-rapidjson
  Downloading python_rapidjson-1.8-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.6 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.6/1.6 MB 21.6 MB/s eta 0:00:00
Collecting ruamel.yaml
  Downloading ruamel.yaml-0.17.21-py3-none-any.whl (109 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 109.5/109.5 kB 36.8 MB/s eta 0:00:00
Collecting textwrap3>=0.9.2
  Downloading textwrap3-0.9.2-py2.py3-none-any.whl (12 kB)
Collecting argon2-cffi-bindings
  Downloading argon2_cffi_bindings-21.2.0-cp36-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (86 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 86.2/86.2 kB 28.3 MB/s eta 0:00:00
Collecting MarkupSafe>=2.0
  Downloading MarkupSafe-2.1.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (25 kB)
Collecting tinycss2
  Downloading tinycss2-1.1.1-py3-none-any.whl (21 kB)
Collecting beautifulsoup4
  Downloading beautifulsoup4-4.11.1-py3-none-any.whl (128 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 128.2/128.2 kB 17.9 MB/s eta 0:00:00
Collecting jupyterlab-pygments
  Downloading jupyterlab_pygments-0.2.2-py2.py3-none-any.whl (21 kB)
Collecting pandocfilters>=1.4.1
  Downloading pandocfilters-1.5.0-py2.py3-none-any.whl (8.7 kB)
Collecting defusedxml
  Downloading defusedxml-0.7.1-py2.py3-none-any.whl (25 kB)
Collecting mistune<2,>=0.8.1
  Downloading mistune-0.8.4-py2.py3-none-any.whl (16 kB)
Collecting webencodings
  Downloading webencodings-0.5.1-py2.py3-none-any.whl (11 kB)
Collecting pyrsistent!=0.17.0,!=0.17.1,!=0.17.2,>=0.14.0
  Downloading pyrsistent-0.18.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (119 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 119.8/119.8 kB 19.4 MB/s eta 0:00:00
Collecting importlib-resources>=1.4.0
  Downloading importlib_resources-5.8.0-py3-none-any.whl (28 kB)
Collecting pyasn1<0.5.0,>=0.4.6
  Downloading pyasn1-0.4.8-py2.py3-none-any.whl (77 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 77.1/77.1 kB 25.4 MB/s eta 0:00:00
Collecting cryptography>=2.0
  Downloading cryptography-37.0.4-cp36-abi3-manylinux_2_24_x86_64.whl (4.1 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 4.1/4.1 MB 21.2 MB/s eta 0:00:00
Collecting pbr!=2.1.0,>=2.0.0
  Downloading pbr-5.9.0-py2.py3-none-any.whl (112 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 112.3/112.3 kB 32.7 MB/s eta 0:00:00
Collecting cffi>=1.0.1
  Downloading cffi-1.15.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (442 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 442.7/442.7 kB 2.8 MB/s eta 0:00:00
Collecting soupsieve>1.2
  Downloading soupsieve-2.3.2.post1-py3-none-any.whl (37 kB)
Collecting ruamel.yaml.clib>=0.2.6
  Downloading ruamel.yaml.clib-0.2.6-cp38-cp38-manylinux1_x86_64.whl (570 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 570.4/570.4 kB 92.8 MB/s eta 0:00:00
Collecting pycparser
  Downloading pycparser-2.21-py2.py3-none-any.whl (118 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 118.7/118.7 kB 39.9 MB/s eta 0:00:00
Building wheels for collected packages: mypy-protobuf, retrying, pylatex, tensorflow-docs, asv, rstcheck, lark, rpcq, msgpack
  Building wheel for mypy-protobuf (setup.py) ... done
  Created wheel for mypy-protobuf: filename=mypy_protobuf-1.10-py3-none-any.whl size=6172 sha256=22edfa87cb95a08e87b26761c10fc4b73e824598fa21833fc274ba05e5419987
  Stored in directory: /home/mhucka/.cache/pip/wheels/d1/25/b2/015dfbde69a44a9470a77112014df69ed3db5be697e671dee2
  Building wheel for retrying (setup.py) ... done
  Created wheel for retrying: filename=retrying-1.3.3-py3-none-any.whl size=11430 sha256=4dbbe525688219dd9275c77959f9e16c225539113cb8c85fd7d9133dfe85a9f3
  Stored in directory: /home/mhucka/.cache/pip/wheels/c4/a7/48/0a434133f6d56e878ca511c0e6c38326907c0792f67b476e56
  Building wheel for pylatex (setup.py) ... done
  Created wheel for pylatex: filename=PyLaTeX-1.3.4-py3-none-any.whl size=42269 sha256=e4eddac444467a799504ac99920d54878ccbfce353f82dc6b2c4280ad07bd0f9
  Stored in directory: /home/mhucka/.cache/pip/wheels/1c/7a/3d/ffaea382fdffbdbc6fc1a5a1d8ae23a558e855aa16e70a5f79
  Building wheel for tensorflow-docs (setup.py) ... done
  Created wheel for tensorflow-docs: filename=tensorflow_docs-0.0.0.dev0-py3-none-any.whl size=174238 sha256=418db5e3061cecb7ad9ef44b0c071eae1c8df3075be0d17bd879226f55316404
  Stored in directory: /home/mhucka/.cache/pip/wheels/55/d9/89/302d46b4a1dd3f3942f8354a07804b83029f766ec464e6728a
  Building wheel for asv (pyproject.toml) ... done
  Created wheel for asv: filename=asv-0.5.1-py3-none-any.whl size=295837 sha256=4788560c16e42a356db19b9257c36d80914ab586513e4c4debe2c478d571b8eb
  Stored in directory: /home/mhucka/.cache/pip/wheels/59/a0/56/8f223b09920ca56372c1ef0bf01d3b166873dbad7006a1b0d8
  Building wheel for rstcheck (setup.py) ... done
  Created wheel for rstcheck: filename=rstcheck-3.3.1-py3-none-any.whl size=13723 sha256=0bd395281d18296b3bfe695db4e09c2e511614ffaeea5a913783a6303deb8cec
  Stored in directory: /home/mhucka/.cache/pip/wheels/bf/b9/ca/1aa2665648aeaffd559c4096e510ed2b343b808121f8d31efb
  Building wheel for lark (setup.py) ... done
  Created wheel for lark: filename=lark-0.11.3-py2.py3-none-any.whl size=99636 sha256=e3cf611e2a959f904266a39c17c7fce67d75becc8bc47893cd2fa53f3f6f5377
  Stored in directory: /home/mhucka/.cache/pip/wheels/34/cb/6c/4df359c2a3f0a1af4cccae6392bee423bb5aff530103de3538
  Building wheel for rpcq (setup.py) ... done
  Created wheel for rpcq: filename=rpcq-3.10.0-py3-none-any.whl size=45957 sha256=3544353539a8bb0d326c4d52c933d141bf6e4d219b0a025a594e4d12bece963f
  Stored in directory: /home/mhucka/.cache/pip/wheels/aa/b7/02/28316b5857a90af7715a47aeb9f8be4377a124f29cb5f3f8f7
  Building wheel for msgpack (setup.py) ... done
  Created wheel for msgpack: filename=msgpack-0.6.2-cp38-cp38-linux_x86_64.whl size=14589 sha256=b55272390e98ec6d3b0f0f25357a1d75bc9b319673f801952142d1678f49a234
  Stored in directory: /home/mhucka/.cache/pip/wheels/5d/f2/04/0d19c10080b996bef17c908a6243e6e65d8da1a4094a3f604d
Successfully built mypy-protobuf retrying pylatex tensorflow-docs asv rstcheck lark rpcq msgpack
Installing collected packages: webencodings, wcwidth, typed-ast, textwrap3, sortedcontainers, Send2Trash, rfc3986, rfc3339, pytz, pyjwt, pyasn1, ptyprocess, ply, pickleshare, mypy-protobuf, mypy-extensions, msgpack, mpmath, mistune, lark, iso8601, ipython-genutils, iniconfig, h11, filelock, fastjsonschema, distlib, commonmark, certifi, backcall, zipp, wrapt, virtualenv-clone, urllib3, typing_extensions, tweedledum, traitlets, tqdm, tornado, toolz, tomli, toml, tinycss2, tenacity, sympy, symengine, soupsieve, sniffio, six, ruamel.yaml.clib, rsa, pyzmq, pyyaml, python-rapidjson, pyrsistent, pyparsing, pygments, pycparser, pyasn1-modules, py, psutil, protobuf, prompt-toolkit, prometheus-client, pluggy, platformdirs, pkginfo, pillow, pexpect, pbr, pathspec, parso, pandocfilters, ordered-set, numpy, networkx, nest-asyncio, mccabe, MarkupSafe, llvmlite, lazy-object-proxy, kiwisolver, jupyterlab-pygments, jeepney, isort, idna, fonttools, execnet, entrypoints, duet, docutils, dill, defusedxml, decorator, cycler, coverage, click, charset-normalizer, cachetools, backports.entry-points-selectable, attrs, astor, ansiwrap, absl-py, virtualenv, terminado, stevedore, scipy, ruamel.yaml, rstcheck, rich, retworkx, retrying, retry, requests, python-dateutil, pylatex, pydantic, proto-plus, packaging, opt_einsum, numba, mypy, matplotlib-inline, jupyter-core, jinja2, jedi, importlib-resources, importlib-metadata, httpcore, grpcio, googleapis-common-protos, google-auth, flynt, cytoolz, codeowners, cffi, bleach, black, beautifulsoup4, autoray, asv, astroid, tensorflow-docs, rpcq, requests-toolbelt, readme-renderer, quimb, qiskit-terra, pytest, pylint, pandas, matplotlib, jupyter-client, jsonschema, ipython, httpx, grpcio-tools, google-api-core, freezegun, cryptography, argon2-cffi-bindings, SecretStorage, seaborn, qiskit-aer, qcs-api-client, pytest-forked, pytest-cov, pytest-asyncio, nbformat, ipykernel, argon2-cffi, pytest-xdist, pyquil, nbclient, keyring, twine, papermill, nbconvert, notebook
Successfully installed MarkupSafe-2.1.1 SecretStorage-3.3.2 Send2Trash-1.8.0 absl-py-1.1.0 ansiwrap-0.8.4 argon2-cffi-21.3.0 argon2-cffi-bindings-21.2.0 astor-0.8.1 astroid-2.11.7 asv-0.5.1 attrs-20.3.0 autoray-0.3.2 backcall-0.2.0 backports.entry-points-selectable-1.1.1 beautifulsoup4-4.11.1 black-22.3.0 bleach-5.0.1 cachetools-4.2.4 certifi-2021.5.30 cffi-1.15.1 charset-normalizer-2.1.0 click-8.1.3 codeowners-0.5.0 commonmark-0.9.1 coverage-6.2 cryptography-37.0.4 cycler-0.11.0 cytoolz-0.12.0 decorator-5.1.1 defusedxml-0.7.1 dill-0.3.4 distlib-0.3.4 docutils-0.19 duet-0.2.7 entrypoints-0.4 execnet-1.9.0 fastjsonschema-2.15.3 filelock-3.0.12 flynt-0.76 fonttools-4.34.4 freezegun-0.3.15 google-api-core-1.31.6 google-auth-1.35.0 googleapis-common-protos-1.56.3 grpcio-1.47.0 grpcio-tools-1.34.1 h11-0.9.0 httpcore-0.11.1 httpx-0.15.5 idna-2.10 importlib-metadata-4.12.0 importlib-resources-5.8.0 iniconfig-1.1.1 ipykernel-5.3.4 ipython-7.31.1 ipython-genutils-0.2.0 iso8601-0.1.16 isort-5.10.1 jedi-0.18.1 jeepney-0.8.0 jinja2-3.1.2 jsonschema-4.6.2 jupyter-client-7.3.4 jupyter-core-4.11.1 jupyterlab-pygments-0.2.2 keyring-23.6.0 kiwisolver-1.4.3 lark-0.11.3 lazy-object-proxy-1.7.1 llvmlite-0.38.1 matplotlib-3.5.2 matplotlib-inline-0.1.3 mccabe-0.7.0 mistune-0.8.4 mpmath-1.2.1 msgpack-0.6.2 mypy-0.782 mypy-extensions-0.4.3 mypy-protobuf-1.10 nbclient-0.6.6 nbconvert-6.5.0 nbformat-5.4.0 nest-asyncio-1.5.5 networkx-2.8.4 notebook-6.4.7 numba-0.55.2 numpy-1.22.4 opt_einsum-3.3.0 ordered-set-4.1.0 packaging-21.3 pandas-1.4.3 pandocfilters-1.5.0 papermill-2.3.4 parso-0.8.3 pathspec-0.9.0 pbr-5.9.0 pexpect-4.8.0 pickleshare-0.7.5 pillow-9.2.0 pkginfo-1.8.3 platformdirs-2.5.2 pluggy-1.0.0 ply-3.11 prometheus-client-0.14.1 prompt-toolkit-3.0.30 proto-plus-1.20.6 protobuf-3.20.1 psutil-5.9.1 ptyprocess-0.7.0 py-1.11.0 pyasn1-0.4.8 pyasn1-modules-0.2.8 pycparser-2.21 pydantic-1.8.2 pygments-2.12.0 pyjwt-1.7.1 pylatex-1.3.4 pylint-2.13.9 pyparsing-3.0.9 pyquil-3.0.1 pyrsistent-0.18.1 pytest-7.1.2 pytest-asyncio-0.18.3 pytest-cov-3.0.0 pytest-forked-1.4.0 pytest-xdist-2.2.1 python-dateutil-2.8.2 python-rapidjson-1.8 pytz-2022.1 pyyaml-6.0 pyzmq-23.2.0 qcs-api-client-0.8.0 qiskit-aer-0.10.4 qiskit-terra-0.21.0 quimb-1.4.0 readme-renderer-35.0 requests-2.28.1 requests-toolbelt-0.9.1 retry-0.9.2 retrying-1.3.3 retworkx-0.11.0 rfc3339-6.2 rfc3986-1.5.0 rich-12.4.4 rpcq-3.10.0 rsa-4.8 rstcheck-3.3.1 ruamel.yaml-0.17.21 ruamel.yaml.clib-0.2.6 scipy-1.8.1 seaborn-0.11.2 six-1.16.0 sniffio-1.2.0 sortedcontainers-2.4.0 soupsieve-2.3.2.post1 stevedore-3.5.0 symengine-0.9.2 sympy-1.10.1 tenacity-8.0.1 tensorflow-docs-0.0.0.dev0 terminado-0.15.0 textwrap3-0.9.2 tinycss2-1.1.1 toml-0.10.2 tomli-2.0.1 toolz-0.12.0 tornado-6.2 tqdm-4.64.0 traitlets-5.3.0 tweedledum-1.1.1 twine-4.0.1 typed-ast-1.4.3 typing_extensions-4.3.0 urllib3-1.26.10 virtualenv-20.8.1 virtualenv-clone-0.5.7 wcwidth-0.2.5 webencodings-0.5.1 wrapt-1.14.1 zipp-3.8.0
ubuntu20:Cirq> ls
apt-system-requirements.txt  benchmarks  cirq-core    cirq-pasqal   CODE_OF_CONDUCT.md  dev_tools   examples     pyproject.toml  rtd_docs
asv.conf.json                check       cirq-google  cirq-rigetti  conftest.py         Dockerfile  LICENSE      README.rst      setup.cfg
AUTHORS                      cirq-aqt    cirq-ionq    cirq-web      CONTRIBUTING.md     docs        MANIFEST.in  release.md      setup.py
ubuntu20:Cirq> pytest .
================================================================== test session starts ==================================================================
platform linux -- Python 3.8.10, pytest-7.1.2, pluggy-1.0.0
rootdir: /home/mhucka/Cirq
plugins: forked-1.4.0, asyncio-0.18.3, cov-3.0.0, xdist-2.2.1
asyncio: mode=legacy
collected 0 items / 1 error                                                                                                                             

======================================================================== ERRORS =========================================================================
_____________________________________________________________ ERROR collecting test session _____________________________________________________________
/usr/lib/python3.8/importlib/__init__.py:127: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
<frozen importlib._bootstrap>:1014: in _gcd_import
    ???
<frozen importlib._bootstrap>:991: in _find_and_load
    ???
<frozen importlib._bootstrap>:961: in _find_and_load_unlocked
    ???
<frozen importlib._bootstrap>:219: in _call_with_frames_removed
    ???
<frozen importlib._bootstrap>:1014: in _gcd_import
    ???
<frozen importlib._bootstrap>:991: in _find_and_load
    ???
<frozen importlib._bootstrap>:975: in _find_and_load_unlocked
    ???
<frozen importlib._bootstrap>:671: in _load_unlocked
    ???
<frozen importlib._bootstrap_external>:848: in exec_module
    ???
<frozen importlib._bootstrap>:219: in _call_with_frames_removed
    ???
cirq-aqt/cirq_aqt/__init__.py:19: in <module>
    from cirq_aqt.aqt_sampler import AQTSampler, AQTSamplerLocalSimulator
cirq-aqt/cirq_aqt/aqt_sampler.py:33: in <module>
    import cirq
E   ModuleNotFoundError: No module named 'cirq'
=================================================================== warnings summary ====================================================================
../.virtualenvs/cirq-py3/lib/python3.8/site-packages/pytest_asyncio/plugin.py:191
  /home/mhucka/.virtualenvs/cirq-py3/lib/python3.8/site-packages/pytest_asyncio/plugin.py:191: DeprecationWarning: The 'asyncio_mode' default value will change to 'strict' in future, please explicitly use 'asyncio_mode=strict' or 'asyncio_mode=auto' in pytest configuration file.
    config.issue_config_time_warning(LEGACY_MODE, stacklevel=2)

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
================================================================ short test summary info ================================================================
ERROR  - ModuleNotFoundError: No module named 'cirq'
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Interrupted: 1 error during collection !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
============================================================== 1 warning, 1 error in 0.14s ==============================================================

Cirq version

0.16.0.dev

@mhucka mhucka added the kind/bug-report Something doesn't seem to work. label Jul 11, 2022
@mhucka mhucka changed the title pytest . fails after setting up Cirq dev environment pytest . fails to find cirq module after setting up Cirq dev environment Jul 11, 2022
@mhucka
Copy link
Contributor Author

mhucka commented Jul 11, 2022

Additional info: the underlying problem is that the Python module search path hasn't been set up to search in the right locations for the Cirq modules in the local source directory (or at least, the instructions as written don't tell the user to do anything that would set it up). Here are 3 options for solutions that I can think of.

  1. Perhaps the simplest solution would be to change the documentation to tell people to run pytest like this:

    python -m pytest .
    

    The reason this works is that in this form, it will automatically add the current directory to Python's sys.path.

  2. An alternative would be to change the documentation to tell people to run the pytest script in the check subdirectory instead of running pytest .; i.e., to do

    check/pytest
    

    That script does some clever things to find the right paths and add them to the PYTHONPATH environment variable prior to invoking pytest. However, the behavior of check/pytest is slightly different from just running pytest . (the latter produces more detail about the files in which failures occur), so perhaps that's undesirable.

  3. Another option would be to change the documentation to tell the user to source the pypath script in the check subdirectory prior to running pytest ., i.e., to change the docs to say this:

    source dev_tools/pypath
    pytest .
    

Out of all of these, I think option 1 might be the safest, but option 2 might have some advantages. People more experienced with Cirq would perhaps have more insight into this.

I'd be happy to do a PR if someone can indicate which option is preferred.

@maffoo
Copy link
Contributor

maffoo commented Jul 11, 2022

Did you run the add2virtualenv command described in the docs? This will add submodule directories to your virtualenv, but only works if you've set things up with virtualenvwrapper.

@mhucka
Copy link
Contributor Author

mhucka commented Jul 11, 2022

Yeah, that will also work, but please note that the docs at https://quantumai.google/cirq/dev/development#setting_up_an_environment tell you to run pytest . before they explain about using add2virtualenv.

(But I guess that points to a 4th option: switch the order of the instructions in the docs, so that people are told to munge the paths first. In that case, if the order is switched and pytest . becomes the 5th step, the instructions should probably not be marked "optional".)

@maffoo
Copy link
Contributor

maffoo commented Jul 11, 2022

Yeah, this clearly needs to be improved. I would suggest reordering the steps for now, though in the longer term it would be nice to avoid relying on virtualenvwrapper, since that is a bit of a niche tool. Note that under the hood add2virtualenv just adds a _virtualenv_path_extensions.pth file in the virtualenv's site packages directory, so the submodule paths could be added to the virtualenv using a .pth file even if not using virtualenvwrapper.

@mhucka
Copy link
Contributor Author

mhucka commented Jul 12, 2022

I only now noticed something else in the docs: the first alternative given in step 5 in https://quantumai.google/cirq/dev/development#setting_up_an_environment is slightly wrong. You can't simply do

./dev_tools/pypath

in a shell because what pypath does (set environment variables) won't affect the environment of the shell running the command. It looks like maybe there was a typo when that was written, and what it actually should say is

. dev_tools/pypath

i.e., using the Bash/sh "." alias for "source", which is equivalent to

source dev_tools/pypath

That is surely how pypath was meant to be used in this context.

@dabacon
Copy link
Collaborator

dabacon commented Jul 12, 2022

Oh that latter one is definitely me typing it in wrong!

@mhucka
Copy link
Contributor Author

mhucka commented Jul 12, 2022

It's so freakin' easy to do. (And seriously, whoever thought "." would be a good idea for a command?)

@MichaelBroughton MichaelBroughton added triage/accepted there is consensus amongst maintainers that this is a real bug or a reasonable feature to add time/after-1.0 area/install labels Jul 13, 2022
@dabacon
Copy link
Collaborator

dabacon commented Jul 13, 2022

So check/pytest sets the path correct? If so, then we should change it to that.

@mhucka
Copy link
Contributor Author

mhucka commented Jul 13, 2022

Following up on today's cirq cynq: if I understood @dabacon correctly, you suggested the answer should actually be to tell people to run check/pytest, yes? Okay, yes :-). That'll work, and if we do that, we don't have to change the order of steps 4 & 5.

@mhucka
Copy link
Contributor Author

mhucka commented Jul 13, 2022

Oh but wait, Orion just now typed the following in the cirq cync chat:

image

So should the instructions actually be that instead?

@mhucka
Copy link
Contributor Author

mhucka commented Jul 13, 2022

My $0.02 is that in this specific context, using check/pytest would be better.

However, note that because it's a Bash shell script, it probably won't work for Windows users. (But then, neither will telling people to do something like source dev_tools/pypath first, so I guess it's a moot point.)

@dabacon
Copy link
Collaborator

dabacon commented Jul 14, 2022

I don't think the changed-files one is correct as this is when setting up a new dev environment, right? So there are no changed files.

@mhucka
Copy link
Contributor Author

mhucka commented Jul 14, 2022

I don't think the changed-files one is correct as this is when setting up a new dev environment, right? So there are no changed files.

Yes, exactly, which is why I think check/pytest is the right one in this case.

mhucka added a commit to mhucka/Cirq that referenced this issue Jul 15, 2022
Following the discussion in issue quantumlib#5713, this 3-line PR changes the
text in https://quantumai.google/cirq/dev/development to avoid two
problems:

1) In step 3 under "Setting up an environment", the `pytest .` command
   will fail to find the `cirq` package because the instructions up to
   that point haven't told the user to do anything to their Python
   environment or search path to enable `pytest` to find the Cirq
   packages.  The discussion around issue quantumlib#5713 seemed to settle on
   telling people to run `check/pytest` instead of running `pytest`
   directly.  While it's true that it takes a long time to run, in
   this context it's probably not a bad idea to tell users to run the
   full tests, and using `check/pytest` is more future-proof in case
   other special things need to be done in the future.

2) In step 4 of the same page, it says to run `./dev_tools/pypath` in
   the user's shell, but that's evidently a typo as written, because
   `pypath` only sets environment variables and so merely executing
   the script won't change the variables in the user's shell.  The
   text _probably_ meant to say `. dev_tools/pypath`, i.e., to use the
   shell '.' command to source the file.  In the changes in this PR, I
   propose instead to tell people to use `source dev_tools/pypath`
   explicitly, because IMHO that's a little less prone to typos and a
   little more obvious.

There is one more change in this PR, which is to change another
command line near the bottom of the page to use the path
`./dev_tools/....` instead of `dev_tools/....`, so that it's
consistent with the style of the other commands given elsewhere on the
page.
rht pushed a commit to rht/Cirq that referenced this issue May 1, 2023
…mlib#5772)

Following the discussion in issue quantumlib#5713, this 3-line PR changes the text in https://quantumai.google/cirq/dev/development to avoid two problems:

1) In step 3 under "Setting up an environment", the `pytest .` command will fail to find the `cirq` package because the instructions up to that point haven't told the user to do anything to their Python environment or search path to enable `pytest` to find the Cirq packages.  The discussion around issue quantumlib#5713 seemed to settle on telling people to run `check/pytest` instead of running `pytest` directly.  While it's true that it takes a long time to run, in this context it's probably not a bad idea to tell users to run the full tests, and using `check/pytest` is more future-proof in case other special things need to be done in the future.

2) In step 4 of the same page, it says to run `./dev_tools/pypath` in the user's shell, but that won't actually work because `pypath` only sets environment variables and so merely executing the script won't change the variables in the user's shell.  The given command evidently has a typo as written; the text _probably_ meant to say `. dev_tools/pypath`, i.e., to use the shell `.` command to source the file.  In the changes in this PR, I propose instead to tell people to use `source dev_tools/pypath` explicitly, because IMHO that's a little less prone to typos and a little more obvious.

There is one more change in this PR, which is to change another (unrelated to the above) command line near the bottom of the page to use the path `./dev_tools/...` instead of `dev_tools/...`, so that it's consistent with the style of the other commands given elsewhere on the page.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/install kind/bug-report Something doesn't seem to work. triage/accepted there is consensus amongst maintainers that this is a real bug or a reasonable feature to add
Projects
None yet
Development

No branches or pull requests

4 participants