I am trying to install ultralytics in a visual environment and I am getting this error message:
pip install ultralytics
Collecting ultralytics
Using cached ultralytics-8.0.6-py3-none-any.whl (251 kB)
Collecting hydra-core>=1.2.0
Using cached hydra_core-1.3.1-py3-none-any.whl (154 kB)
Collecting matplotlib>=3.2.2
Using cached matplotlib-3.6.3-cp311-cp311-win_amd64.whl (7.2 MB)
Collecting numpy>=1.18.5
Using cached numpy-1.24.2-cp311-cp311-win_amd64.whl (14.8 MB)
Collecting opencv-python>=4.1.1
Using cached opencv_python-4.7.0.68-cp37-abi3-win_amd64.whl (38.2 MB)
Collecting Pillow>=7.1.2
Using cached Pillow-9.4.0-cp311-cp311-win_amd64.whl (2.5 MB)
Collecting PyYAML>=5.3.1
Using cached PyYAML-6.0-cp311-cp311-win_amd64.whl (143 kB)
Collecting requests>=2.23.0
Using cached requests-2.28.2-py3-none-any.whl (62 kB)
Collecting scipy>=1.4.1
Using cached scipy-1.10.0-cp311-cp311-win_amd64.whl (42.2 MB)
Collecting ultralytics
Using cached ultralytics-8.0.5-py3-none-any.whl (248 kB)
Using cached ultralytics-8.0.4-py3-none-any.whl (248 kB)
Using cached ultralytics-8.0.3-py3-none-any.whl (247 kB)
Using cached ultralytics-8.0.2-py3-none-any.whl (224 kB)
Using cached ultralytics-8.0.1-py3-none-any.whl (225 kB)
Using cached ultralytics-8.0.0-py3-none-any.whl (219 kB)
Using cached ultralytics-0.0.44-py3-none-any.whl (16 kB)
Collecting GitPython>=3.1.24
Using cached GitPython-3.1.30-py3-none-any.whl (184 kB)
Collecting ultralytics
Using cached ultralytics-0.0.43-py3-none-any.whl (16 kB)
Using cached ultralytics-0.0.42-py3-none-any.whl (16 kB)
Using cached ultralytics-0.0.41-py3-none-any.whl (16 kB)
Using cached ultralytics-0.0.40-py3-none-any.whl (16 kB)
Using cached ultralytics-0.0.39-py3-none-any.whl (16 kB)
Using cached ultralytics-0.0.38-py3-none-any.whl (16 kB)
Using cached ultralytics-0.0.37-py3-none-any.whl (16 kB)
Using cached ultralytics-0.0.36-py3-none-any.whl (16 kB)
Using cached ultralytics-0.0.35-py3-none-any.whl (16 kB)
Using cached ultralytics-0.0.34-py3-none-any.whl (15 kB)
Using cached ultralytics-0.0.33-py3-none-any.whl (15 kB)
Using cached ultralytics-0.0.32-py3-none-any.whl (15 kB)
Using cached ultralytics-0.0.31-py3-none-any.whl (15 kB)
Using cached ultralytics-0.0.30-py3-none-any.whl (15 kB)
Using cached ultralytics-0.0.29-py3-none-any.whl (15 kB)
Using cached ultralytics-0.0.28-py3-none-any.whl (15 kB)
Using cached ultralytics-0.0.27-py3-none-any.whl (15 kB)
Using cached ultralytics-0.0.26-py3-none-any.whl (15 kB)
Using cached ultralytics-0.0.25-py3-none-any.whl (15 kB)
Using cached ultralytics-0.0.24-py3-none-any.whl (15 kB)
Using cached ultralytics-0.0.23-py3-none-any.whl (14 kB)
Using cached ultralytics-0.0.22-py3-none-any.whl (13 kB)
Using cached ultralytics-0.0.21-py3-none-any.whl (13 kB)
Using cached ultralytics-0.0.20-py3-none-any.whl (13 kB)
Using cached ultralytics-0.0.19-py3-none-any.whl (13 kB)
Using cached ultralytics-0.0.18-py3-none-any.whl (13 kB)
Using cached ultralytics-0.0.17-py3-none-any.whl (13 kB)
Using cached ultralytics-0.0.16-py3-none-any.whl (13 kB)
Using cached ultralytics-0.0.15-py3-none-any.whl (13 kB)
Using cached ultralytics-0.0.14-py3-none-any.whl (13 kB)
Using cached ultralytics-0.0.13-py3-none-any.whl (13 kB)
ERROR: Cannot install ultralytics==0.0.13, ultralytics==0.0.14, ultralytics==0.0.15, ultralytics==0.0.16, ultralytics==0.0.17, ultralytics==0.0.18, ultralytics==0.0.19, ultralytics==0.0.20, ultralytics==0.0.21, ultralytics==0.0.22, ultralytics==0.0.23, ultralytics==0.0.24, ultralytics==0.0.25, ultralytics==0.0.26, ultralytics==0.0.27, ultralytics==0.0.28, ultralytics==0.0.29, ultralytics==0.0.30, ultralytics==0.0.31, ultralytics==0.0.32, ultralytics==0.0.33, ultralytics==0.0.34, ultralytics==0.0.35, ultralytics==0.0.36, ultralytics==0.0.37, ultralytics==0.0.38, ultralytics==0.0.39, ultralytics==0.0.40, ultralytics==0.0.41, ultralytics==0.0.42, ultralytics==0.0.43, ultralytics==0.0.44, ultralytics==8.0.0, ultralytics==8.0.1, ultralytics==8.0.2, ultralytics==8.0.3, ultralytics==8.0.4, ultralytics==8.0.5 and ultralytics==8.0.6 because these package versions have conflicting dependencies.
The conflict is caused by:
ultralytics 8.0.6 depends on torch>=1.7.0
ultralytics 8.0.5 depends on torch>=1.7.0
ultralytics 8.0.4 depends on torch>=1.7.0
ultralytics 8.0.3 depends on torch>=1.7.0
ultralytics 8.0.2 depends on torch>=1.7.0
ultralytics 8.0.1 depends on torch>=1.7.0
ultralytics 8.0.0 depends on torch>=1.7.0
ultralytics 0.0.44 depends on torch>=1.7.0
ultralytics 0.0.43 depends on torch>=1.7.0
ultralytics 0.0.42 depends on torch>=1.7.0
ultralytics 0.0.41 depends on torch>=1.7.0
ultralytics 0.0.40 depends on torch>=1.7.0
ultralytics 0.0.39 depends on torch>=1.7.0
ultralytics 0.0.38 depends on torch>=1.7.0
ultralytics 0.0.37 depends on torch>=1.7.0
ultralytics 0.0.36 depends on torch>=1.7.0
ultralytics 0.0.35 depends on torch>=1.7.0
ultralytics 0.0.34 depends on torch>=1.7.0
ultralytics 0.0.33 depends on torch>=1.7.0
ultralytics 0.0.32 depends on torch>=1.7.0
ultralytics 0.0.31 depends on torch>=1.7.0
ultralytics 0.0.30 depends on torch>=1.7.0
ultralytics 0.0.29 depends on torch>=1.7.0
ultralytics 0.0.28 depends on torch>=1.7.0
ultralytics 0.0.27 depends on torch>=1.7.0
ultralytics 0.0.26 depends on torch>=1.7.0
ultralytics 0.0.25 depends on torch>=1.7.0
ultralytics 0.0.24 depends on torch>=1.7.0
ultralytics 0.0.23 depends on torch>=1.7.0
ultralytics 0.0.22 depends on torch>=1.7.0
ultralytics 0.0.21 depends on torch>=1.7.0
ultralytics 0.0.20 depends on torch>=1.7.0
ultralytics 0.0.19 depends on torch>=1.7.0
ultralytics 0.0.18 depends on torch>=1.7.0
ultralytics 0.0.17 depends on torch>=1.7.0
ultralytics 0.0.16 depends on torch>=1.7.0
ultralytics 0.0.15 depends on torch>=1.7.0
ultralytics 0.0.14 depends on torch>=1.7.0
ultralytics 0.0.13 depends on torch>=1.7.0
To fix this you could try to:
1. loosen the range of package versions you've specified
2. remove package versions to allow pip attempt to solve the dependency conflict
ERROR: ResolutionImpossible: for help visit https://pip.pypa.io/en/latest/topics/dependency-resolution/#dealing-with-dependency-conflicts
when I tried to install pytorch manually, I am getting this error:
pip install torch
ERROR: Could not find a version that satisfies the requirement torch (from versions: none)
ERROR: No matching distribution found for torch
How can I fix this issue?
Your problem might be related to the version of Python you are using. This documentation link (https://pypi.org/project/ultralytics/) suggests that (at the moment of writing) the ultralytics package only supports Python 3.7, up to and including Python 3.10.
Edit: I see that in the left column of the documentation is says that Python 3.11 should be supported. However, under Documentation and Install it mentions the information in my original answer.
Related
i am very on amateur on these things. I downloaded pip and then i used this python get-pip.py to install pip which completed successfully and then i used pip install jupyter notebook and i got the below error
error: subprocess-exited-with-error
Any help will ve appreciated
Microsoft Windows [Version 10.0.19043.2130]
(c) Microsoft Corporation. All rights reserved.
C:\Users\antonis>cd Desktop
C:\Users\antonis\Desktop>python get-pip.py
Defaulting to user installation because normal site-packages is not writeable
Collecting pip
Using cached pip-22.3-py3-none-any.whl (2.1 MB)
Collecting wheel
Using cached wheel-0.37.1-py2.py3-none-any.whl (35 kB)
Installing collected packages: wheel, pip
WARNING: The script wheel.exe is installed in 'C:\Users\antonis\AppData\Roaming\Python\Python311\Scripts' which is not on PATH.
Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
Attempting uninstall: pip
Found existing installation: pip 22.3
Uninstalling pip-22.3:
Successfully uninstalled pip-22.3
WARNING: The scripts pip.exe, pip3.10.exe, pip3.11.exe and pip3.exe are installed in 'C:\Users\antonis\AppData\Roaming\Python\Python311\Scripts' which is not on PATH.
Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
Successfully installed pip-22.3 wheel-0.37.1
C:\Users\antonis\Desktop>pip install jupyter notebook
Defaulting to user installation because normal site-packages is not writeable
Collecting jupyter
Using cached jupyter-1.0.0-py2.py3-none-any.whl (2.7 kB)
Collecting notebook
Using cached notebook-6.5.1-py3-none-any.whl (439 kB)
Collecting qtconsole
Using cached qtconsole-5.3.2-py3-none-any.whl (120 kB)
Collecting jupyter-console
Using cached jupyter_console-6.4.4-py3-none-any.whl (22 kB)
Collecting nbconvert
Using cached nbconvert-7.2.2-py3-none-any.whl (271 kB)
Collecting ipykernel
Using cached ipykernel-6.16.1-py3-none-any.whl (138 kB)
Collecting ipywidgets
Using cached ipywidgets-8.0.2-py3-none-any.whl (134 kB)
Collecting jinja2
Using cached Jinja2-3.1.2-py3-none-any.whl (133 kB)
Collecting tornado>=6.1
Using cached tornado-6.2-cp37-abi3-win_amd64.whl (425 kB)
Collecting pyzmq>=17
Using cached pyzmq-24.0.1-cp311-cp311-win_amd64.whl (990 kB)
Collecting argon2-cffi
Using cached argon2_cffi-21.3.0-py3-none-any.whl (14 kB)
Collecting traitlets>=4.2.1
Using cached traitlets-5.5.0-py3-none-any.whl (107 kB)
Collecting jupyter-core>=4.6.1
Using cached jupyter_core-4.11.2-py3-none-any.whl (88 kB)
Collecting jupyter-client>=5.3.4
Using cached jupyter_client-7.4.3-py3-none-any.whl (132 kB)
Collecting ipython-genutils
Using cached ipython_genutils-0.2.0-py2.py3-none-any.whl (26 kB)
Collecting nbformat
Using cached nbformat-5.7.0-py3-none-any.whl (77 kB)
Collecting nest-asyncio>=1.5
Using cached nest_asyncio-1.5.6-py3-none-any.whl (5.2 kB)
Collecting Send2Trash>=1.8.0
Using cached Send2Trash-1.8.0-py3-none-any.whl (18 kB)
Collecting terminado>=0.8.3
Using cached terminado-0.16.0-py3-none-any.whl (16 kB)
Collecting prometheus-client
Using cached prometheus_client-0.15.0-py3-none-any.whl (60 kB)
Collecting nbclassic==0.4.5
Using cached nbclassic-0.4.5-py3-none-any.whl (9.8 MB)
Collecting jupyter-server>=1.8
Using cached jupyter_server-1.21.0-py3-none-any.whl (346 kB)
Collecting notebook-shim>=0.1.0
Using cached notebook_shim-0.2.0-py3-none-any.whl (13 kB)
Collecting entrypoints
Using cached entrypoints-0.4-py3-none-any.whl (5.3 kB)
Requirement already satisfied: python-dateutil>=2.8.2 in c:\users\antonis\appdata\roaming\python\python311\site-packages (from jupyter-client>=5.3.4->notebook) (2.8.2)
Collecting pywin32>=1.0
Using cached pywin32-304-cp311-cp311-win_amd64.whl (12.1 MB)
Collecting beautifulsoup4
Using cached beautifulsoup4-4.11.1-py3-none-any.whl (128 kB)
Collecting bleach
Using cached bleach-5.0.1-py3-none-any.whl (160 kB)
Collecting defusedxml
Using cached defusedxml-0.7.1-py2.py3-none-any.whl (25 kB)
Collecting jupyterlab-pygments
Using cached jupyterlab_pygments-0.2.2-py2.py3-none-any.whl (21 kB)
Collecting markupsafe>=2.0
Using cached MarkupSafe-2.1.1.tar.gz (18 kB)
Preparing metadata (setup.py) ... done
Collecting mistune<3,>=2.0.3
Using cached mistune-2.0.4-py2.py3-none-any.whl (24 kB)
Collecting nbclient>=0.5.0
Using cached nbclient-0.7.0-py3-none-any.whl (71 kB)
Requirement already satisfied: packaging in c:\users\antonis\appdata\roaming\python\python311\site-packages (from nbconvert->jupyter) (21.3)
Collecting pandocfilters>=1.4.1
Using cached pandocfilters-1.5.0-py2.py3-none-any.whl (8.7 kB)
Collecting pygments>=2.4.1
Using cached Pygments-2.13.0-py3-none-any.whl (1.1 MB)
Collecting tinycss2
Using cached tinycss2-1.2.1-py3-none-any.whl (21 kB)
Collecting fastjsonschema
Using cached fastjsonschema-2.16.2-py3-none-any.whl (22 kB)
Collecting jsonschema>=2.6
Using cached jsonschema-4.16.0-py3-none-any.whl (83 kB)
Collecting pywinpty>=1.1.0
Using cached pywinpty-2.0.8.tar.gz (23 kB)
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing metadata (pyproject.toml) ... error
error: subprocess-exited-with-error
× Preparing metadata (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [6 lines of output]
Cargo, the Rust package manager, is not installed or is not on PATH.
This package requires Rust and Cargo to compile extensions. Install it through
the system's package manager or via https://rustup.rs/
Checking for Rust toolchain....
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed
× Encountered error while generating package metadata.
╰─> See above for output.
note: This is an issue with the package mentioned above, not pip.
hint: See above for details.
This problem is usually related to your python version, you can try to delete python 3.10 and install 3.9
When trying to install scanpy, I get the following error
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.
poetry 1.1.11 requires packaging<21.0,>=20.4, but you have packaging 21.2 which is incompatible
In that sense, I tried to downgrade packaging from version 21.2 to 20.9 or 20.8, with
! pip install --upgrade packaging==20.9
or with
! pip uninstall packaging -y
! pip install -I packaging==20.8
but I still get that error, as if the packaging version did not change.
Here is the full block
! pip install --upgrade packaging==20.9
#! pip uninstall packaging -y
#! pip install -I packaging==20.8
#! pip install poetry --upgrade
! pip uninstall scanpy -y
! pip install -I scanpy
and the full output
Collecting packaging==20.9
Using cached packaging-20.9-py2.py3-none-any.whl (40 kB)
Requirement already satisfied: pyparsing>=2.0.2 in /data04/projects04/MarianaBoroni/lbbc_members/lib/conda_envs/diogoamb/lib/python3.9/site-packages (from packaging==20.9) (3.0.4)
Installing collected packages: packaging
Attempting uninstall: packaging
Found existing installation: packaging 21.2
Uninstalling packaging-21.2:
Successfully uninstalled packaging-21.2
Successfully installed packaging-20.9
Found existing installation: scanpy 1.8.2
Uninstalling scanpy-1.8.2:
Successfully uninstalled scanpy-1.8.2
Collecting scanpy
Using cached scanpy-1.8.2-py3-none-any.whl (2.0 MB)
Collecting anndata>=0.7.4
Using cached anndata-0.7.6-py3-none-any.whl (127 kB)
Collecting h5py>=2.10.0
Using cached h5py-3.5.0-cp39-cp39-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (4.5 MB)
Collecting scipy>=1.4
Using cached scipy-1.7.1-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.whl (28.5 MB)
Collecting sinfo
Using cached sinfo-0.3.4-py3-none-any.whl
Collecting matplotlib>=3.1.2
Using cached matplotlib-3.4.3-cp39-cp39-manylinux1_x86_64.whl (10.3 MB)
Collecting umap-learn>=0.3.10
Using cached umap_learn-0.5.2-py3-none-any.whl
Collecting numba>=0.41.0
Using cached numba-0.54.1-cp39-cp39-manylinux2014_x86_64.manylinux_2_17_x86_64.whl (3.3 MB)
Collecting joblib
Using cached joblib-1.1.0-py2.py3-none-any.whl (306 kB)
Collecting numpy>=1.17.0
Using cached numpy-1.21.4-cp39-cp39-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (15.7 MB)
Collecting seaborn
Using cached seaborn-0.11.2-py3-none-any.whl (292 kB)
Collecting natsort
Using cached natsort-8.0.0-py3-none-any.whl (37 kB)
Collecting statsmodels>=0.10.0rc2
Using cached statsmodels-0.13.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (9.9 MB)
Collecting networkx>=2.3
Using cached networkx-2.6.3-py3-none-any.whl (1.9 MB)
Collecting tables
Using cached tables-3.6.1-cp39-cp39-manylinux2010_x86_64.whl (14.3 MB)
Collecting tqdm
Using cached tqdm-4.62.3-py2.py3-none-any.whl (76 kB)
Collecting patsy
Using cached patsy-0.5.2-py2.py3-none-any.whl (233 kB)
Collecting scikit-learn>=0.22
Using cached scikit_learn-1.0.1-cp39-cp39-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (24.7 MB)
Collecting packaging
Using cached packaging-21.2-py3-none-any.whl (40 kB)
Collecting pandas>=0.21
Using cached pandas-1.3.4-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (11.5 MB)
Collecting xlrd<2.0
Using cached xlrd-1.2.0-py2.py3-none-any.whl (103 kB)
Collecting kiwisolver>=1.0.1
Using cached kiwisolver-1.3.2-cp39-cp39-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (1.6 MB)
Collecting cycler>=0.10
Using cached cycler-0.11.0-py3-none-any.whl (6.4 kB)
Collecting pyparsing>=2.2.1
Using cached pyparsing-3.0.4-py3-none-any.whl (96 kB)
Collecting python-dateutil>=2.7
Using cached python_dateutil-2.8.2-py2.py3-none-any.whl (247 kB)
Collecting pillow>=6.2.0
Using cached Pillow-8.4.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.1 MB)
Collecting llvmlite<0.38,>=0.37.0rc1
Using cached llvmlite-0.37.0-cp39-cp39-manylinux2014_x86_64.whl (26.3 MB)
Collecting numpy>=1.17.0
Using cached numpy-1.20.3-cp39-cp39-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (15.4 MB)
Collecting setuptools
Using cached setuptools-58.5.3-py3-none-any.whl (946 kB)
Collecting pyparsing>=2.2.1
Using cached pyparsing-2.4.7-py2.py3-none-any.whl (67 kB)
Collecting pytz>=2017.3
Using cached pytz-2021.3-py2.py3-none-any.whl (503 kB)
Collecting six>=1.5
Using cached six-1.16.0-py2.py3-none-any.whl (11 kB)
Collecting threadpoolctl>=2.0.0
Using cached threadpoolctl-3.0.0-py3-none-any.whl (14 kB)
Collecting pynndescent>=0.5
Using cached pynndescent-0.5.5-py3-none-any.whl
Collecting stdlib-list
Using cached stdlib_list-0.8.0-py3-none-any.whl (63 kB)
Collecting numexpr>=2.6.2
Using cached numexpr-2.7.3-cp39-cp39-manylinux2010_x86_64.whl (471 kB)
Installing collected packages: numpy, threadpoolctl, six, setuptools, scipy, llvmlite, joblib, scikit-learn, pytz, python-dateutil, pyparsing, pillow, numba, kiwisolver, cycler, xlrd, tqdm, stdlib-list, pynndescent, patsy, pandas, packaging, numexpr, natsort, matplotlib, h5py, umap-learn, tables, statsmodels, sinfo, seaborn, networkx, anndata, scanpy
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.
poetry 1.1.11 requires packaging<21.0,>=20.4, but you have packaging 21.2 which is incompatible.
Successfully installed anndata-0.7.6 cycler-0.11.0 h5py-3.5.0 joblib-1.1.0 kiwisolver-1.3.2 llvmlite-0.37.0 matplotlib-3.4.3 natsort-8.0.0 networkx-2.6.3 numba-0.54.1 numexpr-2.7.3 numpy-1.21.1 packaging-21.2 pandas-1.3.4 patsy-0.5.2 pillow-8.4.0 pynndescent-0.5.5 pyparsing-3.0.4 python-dateutil-2.8.2 pytz-2021.3 scanpy-1.8.2 scikit-learn-1.0.1 scipy-1.7.1 seaborn-0.11.2 setuptools-58.5.3 sinfo-0.3.4 six-1.16.0 statsmodels-0.13.0 stdlib-list-0.8.0 tables-3.6.1 threadpoolctl-3.0.0 tqdm-4.62.3 umap-learn-0.5.2 xlrd-1.2.0
You could try installing all your packages in one line like this and see if the conflicts are resolved, pip install packaging scanpy. You could also try with your specific versions like this pip install packaging==20.9 scanpy==1.0 or whatever version you like. You can also try installing like this pip install package>=20.9 package2<1.9
You could also try using a package manager like conda or mamba, create a new environment and try installing the packages there. The package managers try to resolve conflicts like that.
I am using client library google-cloud-pubsub in order to to interact with Google Cloud Platform's Pub/Sub service. There is a class in that library called google.cloud.pubsub_v1.types.Subscription, documentation for which appears at https://googleapis.dev/python/pubsub/latest/types.html.
I am using this library successfully an am able to interact with a Pub/Sub subscription using something like the following:
from google.cloud import pubsub_v1
def myfunc(project_id, subscription):
subscriber = pubsub_v1.SubscriberClient()
subscription_path = subscriber.subscription_path(project_id, subscription.name)
# do something using the subscription...
I'm now trying to be a good python citizen and use type annotations in my code. I know that the value passed to the subscription argument will be of type google.cloud.pubsub_v1.types.Subscription so I'd like to write the appropriate type annotation, but I'm getting a bit confused about the behaviour that I am seeing. My editor's (my editor is VSCode) intellisense understands about pubsub_v1.types module:
However it doesn't seem to know about the Subscription class therein:
Same on PyCharm, it knows about google.cloud.pubsub_v1.types:
but not google.cloud.pubsub_v1.types.Subscription
I am struggling to understand why this might be so am hoping someone can explain it to me.
In case it helps, here's how i set up a virtualenv for this:
➜ /tmp python3 -m venv venv
➜ /tmp source venv/bin/activate
(venv) ➜ /tmp python -m pip install google-cloud-pubsub
Collecting google-cloud-pubsub
Downloading google_cloud_pubsub-2.7.0-py2.py3-none-any.whl (217 kB)
|████████████████████████████████| 217 kB 1.6 MB/s
Collecting grpcio<2.0dev,>=1.38.1
Using cached grpcio-1.39.0-cp39-cp39-macosx_10_10_x86_64.whl (3.9 MB)
Collecting grpc-google-iam-v1<0.13dev,>=0.12.3
Using cached grpc-google-iam-v1-0.12.3.tar.gz (13 kB)
Collecting libcst>=0.3.10
Downloading libcst-0.3.20-py3-none-any.whl (514 kB)
|████████████████████████████████| 514 kB 2.5 MB/s
Collecting proto-plus>=1.7.1
Using cached proto_plus-1.19.0-py3-none-any.whl (42 kB)
Collecting packaging>=14.3
Using cached packaging-21.0-py3-none-any.whl (40 kB)
Collecting google-api-core[grpc]<3.0.0dev,>=1.26.0
Downloading google_api_core-1.31.1-py2.py3-none-any.whl (93 kB)
|████████████████████████████████| 93 kB 2.8 MB/s
Collecting googleapis-common-protos<2.0dev,>=1.6.0
Using cached googleapis_common_protos-1.53.0-py2.py3-none-any.whl (198 kB)
Collecting google-auth<2.0dev,>=1.25.0
Downloading google_auth-1.34.0-py2.py3-none-any.whl (152 kB)
|████████████████████████████████| 152 kB 1.9 MB/s
Requirement already satisfied: setuptools>=40.3.0 in ./venv/lib/python3.9/site-packages (from google-api-core[grpc]<3.0.0dev,>=1.26.0->google-cloud-pubsub) (54.1.2)
Collecting pytz
Using cached pytz-2021.1-py2.py3-none-any.whl (510 kB)
Collecting protobuf>=3.12.0
Using cached protobuf-3.17.3-cp39-cp39-macosx_10_9_x86_64.whl (1.0 MB)
Collecting requests<3.0.0dev,>=2.18.0
Using cached requests-2.26.0-py2.py3-none-any.whl (62 kB)
Collecting six>=1.13.0
Using cached six-1.16.0-py2.py3-none-any.whl (11 kB)
Collecting cachetools<5.0,>=2.0.0
Using cached cachetools-4.2.2-py3-none-any.whl (11 kB)
Collecting rsa<5,>=3.1.4
Using cached rsa-4.7.2-py3-none-any.whl (34 kB)
Collecting pyasn1-modules>=0.2.1
Using cached pyasn1_modules-0.2.8-py2.py3-none-any.whl (155 kB)
Collecting pyyaml>=5.2
Using cached PyYAML-5.4.1-cp39-cp39-macosx_10_9_x86_64.whl (259 kB)
Collecting typing-extensions>=3.7.4.2
Using cached typing_extensions-3.10.0.0-py3-none-any.whl (26 kB)
Collecting typing-inspect>=0.4.0
Using cached typing_inspect-0.7.1-py3-none-any.whl (8.4 kB)
Collecting pyparsing>=2.0.2
Using cached pyparsing-2.4.7-py2.py3-none-any.whl (67 kB)
Collecting pyasn1<0.5.0,>=0.4.6
Using cached pyasn1-0.4.8-py2.py3-none-any.whl (77 kB)
Collecting idna<4,>=2.5
Using cached idna-3.2-py3-none-any.whl (59 kB)
Collecting certifi>=2017.4.17
Using cached certifi-2021.5.30-py2.py3-none-any.whl (145 kB)
Collecting charset-normalizer~=2.0.0
Downloading charset_normalizer-2.0.4-py3-none-any.whl (36 kB)
Collecting urllib3<1.27,>=1.21.1
Using cached urllib3-1.26.6-py2.py3-none-any.whl (138 kB)
Collecting mypy-extensions>=0.3.0
Using cached mypy_extensions-0.4.3-py2.py3-none-any.whl (4.5 kB)
Using legacy 'setup.py install' for grpc-google-iam-v1, since package 'wheel' is not installed.
Installing collected packages: six, pyasn1, urllib3, rsa, pyparsing, pyasn1-modules, protobuf, idna, charset-normalizer, certifi, cachetools, typing-extensions, requests, pytz, packaging, mypy-extensions, grpcio, googleapis-common-protos, google-auth, typing-inspect, pyyaml, google-api-core, proto-plus, libcst, grpc-google-iam-v1, google-cloud-pubsub
Running setup.py install for grpc-google-iam-v1 ... done
Successfully installed cachetools-4.2.2 certifi-2021.5.30 charset-normalizer-2.0.4 google-api-core-1.31.1 google-auth-1.34.0 google-cloud-pubsub-2.7.0 googleapis-common-protos-1.53.0 grpc-google-iam-v1-0.12.3 grpcio-1.39.0 idna-3.2 libcst-0.3.20 mypy-extensions-0.4.3 packaging-21.0 proto-plus-1.19.0 protobuf-3.17.3 pyasn1-0.4.8 pyasn1-modules-0.2.8 pyparsing-2.4.7 pytz-2021.1 pyyaml-5.4.1 requests-2.26.0 rsa-4.7.2 six-1.16.0 typing-extensions-3.10.0.0 typing-inspect-0.7.1 urllib3-1.26.6
WARNING: You are using pip version 21.0.1; however, version 21.2.4 is available.
You should consider upgrading via the '/private/tmp/venv/bin/python -m pip install --upgrade pip' command.
When I try to install tensorflowjs_converter to convert my model.h5 to a json file it doesn't install it, I used pip3 install tensorflowjs to install it and it returns this error message:
ERROR: ResolutionImpossible: for help visit https://pip.pypa.io/en/latest/user_guide/#fixing-conflicting-dependencies
Here is what happened before the error appeared:
Collecting tensorflowjs
Using cached tensorflowjs-3.0.0-py3-none-any.whl (63 kB)
Collecting h5py<3,>=2.8.0
Using cached h5py-2.10.0.tar.gz (301 kB)
Collecting tensorflowjs
Using cached tensorflowjs-2.8.5-py3-none-any.whl (63 kB)
Using cached tensorflowjs-2.8.4-py3-none-any.whl (63 kB)
Using cached tensorflowjs-2.8.3-py3-none-any.whl (63 kB)
Using cached tensorflowjs-2.8.2-py3-none-any.whl (63 kB)
Using cached tensorflowjs-2.8.1-py3-none-any.whl (63 kB)
Using cached tensorflowjs-2.8.0-py3-none-any.whl (63 kB)
Using cached tensorflowjs-2.7.0-py3-none-any.whl (62 kB)
Using cached tensorflowjs-2.6.0-py3-none-any.whl (61 kB)
Using cached tensorflowjs-2.5.0-py3-none-any.whl (61 kB)
Using cached tensorflowjs-2.4.0-py3-none-any.whl (61 kB)
Collecting h5py>=2.8.0
Using cached h5py-3.1.0-cp39-cp39-win_amd64.whl (2.7 MB)
Collecting PyInquirer==1.0.3
Using cached PyInquirer-1.0.3.tar.gz (27 kB)
Collecting tensorflow-hub==0.7.0
Using cached tensorflow_hub-0.7.0-py2.py3-none-any.whl (89 kB)
Collecting numpy<1.19.0,>=1.16.4
Downloading numpy-1.18.5.zip (5.4 MB)
|████████████████████████████████| 5.4 MB 930 kB/s
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing wheel metadata ... done
Requirement already satisfied: six>=1.12.0 in c:\python39\lib\site-packages (from tensorflowjs) (1.15.0)
Collecting tensorflowjs
Using cached tensorflowjs-2.3.0-py3-none-any.whl (61 kB)
Using cached tensorflowjs-2.1.0-py3-none-any.whl (60 kB)
Using cached tensorflowjs-2.0.1.post1-py3-none-any.whl (60 kB)
Using cached tensorflowjs-2.0.1-py3-none-any.whl (60 kB)
Requirement already satisfied: numpy>=1.16.4 in c:\python39\lib\site-packages (from tensorflowjs) (1.19.5)
Using cached tensorflowjs-2.0.0-py3-none-any.whl (57 kB)
Using cached tensorflowjs-1.7.4.post1-py3-none-any.whl (57 kB)
Using cached tensorflowjs-1.7.4-py3-none-any.whl (57 kB)
Collecting gast==0.2.2
Using cached gast-0.2.2.tar.gz (10 kB)
Collecting tensorflowjs
Using cached tensorflowjs-1.7.3-py3-none-any.whl (57 kB)
Using cached tensorflowjs-1.7.2-py3-none-any.whl (57 kB)
Using cached tensorflowjs-1.6.0-py3-none-any.whl (57 kB)
Using cached tensorflowjs-1.5.2-py3-none-any.whl (56 kB)
Using cached tensorflowjs-1.4.0-py3-none-any.whl (56 kB)
Using cached tensorflowjs-1.3.2-py3-none-any.whl (53 kB)
Using cached tensorflowjs-1.3.1.1-py3-none-any.whl (53 kB)
Using cached tensorflowjs-1.3.1-py3-none-any.whl (53 kB)
Using cached tensorflowjs-1.2.10.1-py3-none-any.whl (47 kB)
Collecting h5py==2.8.0
Using cached h5py-2.8.0.tar.gz (274 kB)
Collecting tensorflowjs
Using cached tensorflowjs-1.2.10-py3-none-any.whl (47 kB)
Using cached tensorflowjs-1.2.9-py3-none-any.whl (46 kB)
Collecting keras==2.2.4
Using cached Keras-2.2.4-py2.py3-none-any.whl (312 kB)
Collecting tensorflowjs
Using cached tensorflowjs-1.2.6-py3-none-any.whl (39 kB)
Using cached tensorflowjs-1.2.3-py3-none-any.whl (39 kB)
Using cached tensorflowjs-1.2.2.1-py3-none-any.whl (37 kB)
Collecting tensorflow-hub==0.3.0
Using cached tensorflow_hub-0.3.0-py2.py3-none-any.whl (73 kB)
Collecting tensorflowjs
Using cached tensorflowjs-1.2.2-py3-none-any.whl (38 kB)
Using cached tensorflowjs-1.2.1-py3-none-any.whl (37 kB)
Collecting numpy==1.15.1
Using cached numpy-1.15.1.zip (4.5 MB)
Collecting tensorflowjs
Using cached tensorflowjs-1.1.2-py3-none-any.whl (36 kB)
Using cached tensorflowjs-1.0.1-py3-none-any.whl (35 kB)
Using cached tensorflowjs-0.8.6-py3-none-any.whl (39 kB)
Collecting tensorflow-hub==0.1.1
Using cached tensorflow_hub-0.1.1-py2.py3-none-any.whl (52 kB)
Collecting keras==2.2.2
Using cached Keras-2.2.2-py2.py3-none-any.whl (299 kB)
Collecting tensorflowjs
Using cached tensorflowjs-0.8.5-py3-none-any.whl (39 kB)
Using cached tensorflowjs-0.8.0-py3-none-any.whl (39 kB)
Using cached tensorflowjs-0.6.7-py3-none-any.whl (34 kB)
Using cached tensorflowjs-0.6.5-py3-none-any.whl (33 kB)
Collecting six==1.11.0
Using cached six-1.11.0-py2.py3-none-any.whl (10 kB)
Collecting tensorflowjs
Using cached tensorflowjs-0.6.4-py3-none-any.whl (33 kB)
Using cached tensorflowjs-0.6.2-py3-none-any.whl (33 kB)
Using cached tensorflowjs-0.6.1-py3-none-any.whl (33 kB)
Using cached tensorflowjs-0.6.0-py3-none-any.whl (33 kB)
Using cached tensorflowjs-0.5.7-py3-none-any.whl (33 kB)
Collecting numpy==1.14.1
Using cached numpy-1.14.1.zip (4.9 MB)
Collecting tensorflowjs
Using cached tensorflowjs-0.5.6-py3-none-any.whl (33 kB)
Using cached tensorflowjs-0.5.4-py3-none-any.whl (33 kB)
Using cached tensorflowjs-0.5.2-py3-none-any.whl (31 kB)
Using cached tensorflowjs-0.5.0-py3-none-any.whl (31 kB)
Using cached tensorflowjs-0.4.2-py3-none-any.whl (31 kB)
Using cached tensorflowjs-0.4.1-py3-none-any.whl (31 kB)
Using cached tensorflowjs-0.4.0-py3-none-any.whl (31 kB)
Collecting tensorflow-hub==0.1.0
Downloading tensorflow_hub-0.1.0-py2.py3-none-any.whl (53 kB)
|████████████████████████████████| 53 kB 3.8 MB/s
Collecting tensorflowjs
Using cached tensorflowjs-0.3.1-py3-none-any.whl (30 kB)
Using cached tensorflowjs-0.3.0-py3-none-any.whl (29 kB)
Using cached tensorflowjs-0.2.1-py3-none-any.whl (28 kB)
Using cached tensorflowjs-0.2.0-py3-none-any.whl (28 kB)
Using cached tensorflowjs-0.1.2-py3-none-any.whl (24 kB)
Using cached tensorflowjs-0.1.1-py3-none-any.whl (20 kB)
Using cached tensorflowjs-0.1.0-py3-none-any.whl (21 kB)
ERROR: Cannot install tensorflowjs==0.1.0, tensorflowjs==0.1.1, tensorflowjs==0.1.2, tensorflowjs==0.2.0, tensorflowjs==0.2.1, tensorflowjs==0.3.0, tensorflowjs==0.3.1, tensorflowjs==0.4.0, tensorflowjs==0.4.1, tensorflowjs==0.4.2, tensorflowjs==0.5.0, tensorflowjs==0.5.2, tensorflowjs==0.5.4, tensorflowjs==0.5.6, tensorflowjs==0.5.7, tensorflowjs==0.6.0, tensorflowjs==0.6.1, tensorflowjs==0.6.2, tensorflowjs==0.6.4, tensorflowjs==0.6.5, tensorflowjs==0.6.7, tensorflowjs==0.8.0, tensorflowjs==0.8.5, tensorflowjs==0.8.6, tensorflowjs==1.0.1, tensorflowjs==1.1.2, tensorflowjs==1.2.1, tensorflowjs==1.2.10, tensorflowjs==1.2.10.1, tensorflowjs==1.2.2, tensorflowjs==1.2.2.1, tensorflowjs==1.2.3, tensorflowjs==1.2.6, tensorflowjs==1.2.9, tensorflowjs==1.3.1, tensorflowjs==1.3.1.1, tensorflowjs==1.3.2, tensorflowjs==1.4.0, tensorflowjs==1.5.2, tensorflowjs==1.6.0, tensorflowjs==1.7.2, tensorflowjs==1.7.3, tensorflowjs==1.7.4, tensorflowjs==1.7.4.post1, tensorflowjs==2.0.0, tensorflowjs==2.0.1, tensorflowjs==2.0.1.post1, tensorflowjs==2.1.0, tensorflowjs==2.3.0, tensorflowjs==2.4.0, tensorflowjs==2.5.0, tensorflowjs==2.6.0, tensorflowjs==2.7.0, tensorflowjs==2.8.0, tensorflowjs==2.8.1, tensorflowjs==2.8.2, tensorflowjs==2.8.3, tensorflowjs==2.8.4, tensorflowjs==2.8.5 and tensorflowjs==3.0.0 because these package versions have conflicting dependencies.
The conflict is caused by:
tensorflowjs 3.0.0 depends on tensorflow<3 and >=2.1.0
tensorflowjs 2.8.5 depends on tensorflow<3 and >=2.1.0
tensorflowjs 2.8.4 depends on tensorflow<3 and >=2.1.0
tensorflowjs 2.8.3 depends on tensorflow<3 and >=2.1.0
tensorflowjs 2.8.2 depends on tensorflow<3 and >=2.1.0
tensorflowjs 2.8.1 depends on tensorflow<3 and >=2.1.0
tensorflowjs 2.8.0 depends on tensorflow<3 and >=2.1.0
tensorflowjs 2.7.0 depends on tensorflow<3 and >=2.1.0
tensorflowjs 2.6.0 depends on tensorflow<3 and >=2.1.0
tensorflowjs 2.5.0 depends on tensorflow<3 and >=2.1.0
tensorflowjs 2.4.0 depends on tensorflow-cpu<3 and >=2.1.0
tensorflowjs 2.3.0 depends on tensorflow-cpu<3 and >=2.1.0
tensorflowjs 2.1.0 depends on tensorflow-cpu<3 and >=2.1.0
tensorflowjs 2.0.1.post1 depends on tensorflow-cpu<3 and >=2.1.0
tensorflowjs 2.0.1 depends on tensorflow-cpu>=2.1.0<3
tensorflowjs 2.0.0 depends on tensorflow-cpu>=2.1.0<3
tensorflowjs 1.7.4.post1 depends on tensorflow-cpu>=2.1.0<3
tensorflowjs 1.7.4 depends on tensorflow-cpu==2.1.0
tensorflowjs 1.7.3 depends on tensorflow-cpu==2.1.0
tensorflowjs 1.7.2 depends on tensorflow-cpu==2.1.0
tensorflowjs 1.6.0 depends on tensorflow-cpu==2.1.0
tensorflowjs 1.5.2 depends on tensorflow-cpu==2.1.0
tensorflowjs 1.4.0 depends on tensorflow==1.15.0
tensorflowjs 1.3.2 depends on tensorflow==1.15.0
tensorflowjs 1.3.1.1 depends on tensorflow==1.15.0
tensorflowjs 1.3.1 depends on tensorflow==1.15.0
tensorflowjs 1.2.10.1 depends on tensorflow==1.14.0
tensorflowjs 1.2.10 depends on tensorflow==1.14.0
tensorflowjs 1.2.9 depends on tensorflow==1.14.0
tensorflowjs 1.2.6 depends on tensorflow==1.14.0
tensorflowjs 1.2.3 depends on tensorflow==1.14.0
tensorflowjs 1.2.2.1 depends on tensorflow==1.14.0
tensorflowjs 1.2.2 depends on tensorflow==1.14.0
tensorflowjs 1.2.1 depends on tf-nightly-2.0-preview==2.0.0.dev20190605
tensorflowjs 1.1.2 depends on tf-nightly-2.0-preview>=2.0.0.dev20190502
tensorflowjs 1.0.1 depends on tf-nightly-2.0-preview>=2.0.0.dev20190304
tensorflowjs 0.8.6 depends on tensorflow==1.13.1
tensorflowjs 0.8.5 depends on tensorflow==1.13.1
tensorflowjs 0.8.0 depends on tensorflow==1.12.0
tensorflowjs 0.6.7 depends on tensorflow==1.12.0
tensorflowjs 0.6.5 depends on tensorflow==1.11.0
tensorflowjs 0.6.4 depends on tensorflow==1.11.0
tensorflowjs 0.6.2 depends on tensorflow==1.11.0
tensorflowjs 0.6.1 depends on tensorflow==1.10.1
tensorflowjs 0.6.0 depends on tensorflow==1.10.1
tensorflowjs 0.5.7 depends on tensorflow==1.9.0
tensorflowjs 0.5.6 depends on tensorflow==1.9.0
tensorflowjs 0.5.4 depends on tensorflow==1.9.0
tensorflowjs 0.5.2 depends on tensorflow==1.8.0
tensorflowjs 0.5.0 depends on tensorflow==1.8.0
tensorflowjs 0.4.2 depends on tensorflow==1.8.0
tensorflowjs 0.4.1 depends on tensorflow==1.8.0
tensorflowjs 0.4.0 depends on tensorflow==1.7.0
tensorflowjs 0.3.1 depends on tensorflow==1.7.0
tensorflowjs 0.3.0 depends on tensorflow==1.7.0
tensorflowjs 0.2.1 depends on tensorflow==1.7.0
tensorflowjs 0.2.0 depends on tensorflow==1.7.0
tensorflowjs 0.1.2 depends on tensorflow==1.7.0
tensorflowjs 0.1.1 depends on tensorflow>=1.6.0
tensorflowjs 0.1.0 depends on tensorflow>=1.6.0
To fix this you could try to:
1. loosen the range of package versions you've specified
2. remove package versions to allow pip attempt to solve the dependency conflict
ERROR: ResolutionImpossible: for help visit https://pip.pypa.io/en/latest/user_guide/#fixing-conflicting-dependencies
I tried using pip but same results, if I didn't provide enough information, please comment.
tensorflowjs requires tensorflow and tensorflow currently (at veriosn 2.4.1) doesn't support Python 3.9. Only 64-bit Python 3.6-3.8 are supported.
Downgrade to Python 3.8.
Google provides a sample HelloAnalytics.py to demonstrate the use of google-api-python-client.
Below the heading "2. Install the client library" they write:
Use pip, the recommended tool for installing Python packages:
sudo pip install --upgrade google-api-python-client
I wonder why I should use sudo while a simple pip (without sudo) seems to work perfectly (on my Mac):
% pip install google-api-python-client
Collecting google-api-python-client
Using cached google_api_python_client-1.9.3-py3-none-any.whl (59 kB)
Collecting six<2dev,>=1.6.1
Using cached six-1.15.0-py2.py3-none-any.whl (10 kB)
Collecting google-auth-httplib2>=0.0.3
Using cached google_auth_httplib2-0.0.3-py2.py3-none-any.whl (6.3 kB)
Collecting google-api-core<2dev,>=1.18.0
Using cached google_api_core-1.20.1-py2.py3-none-any.whl (90 kB)
Collecting uritemplate<4dev,>=3.0.0
Using cached uritemplate-3.0.1-py2.py3-none-any.whl (15 kB)
Collecting httplib2<1dev,>=0.9.2
Using cached httplib2-0.18.1-py3-none-any.whl (95 kB)
Collecting google-auth>=1.16.0
Using cached google_auth-1.17.2-py2.py3-none-any.whl (90 kB)
Collecting protobuf>=3.12.0
Using cached protobuf-3.12.2-cp37-cp37m-macosx_10_9_x86_64.whl (1.3 MB)
Collecting pytz
Using cached pytz-2020.1-py2.py3-none-any.whl (510 kB)
Collecting requests<3.0.0dev,>=2.18.0
Using cached requests-2.23.0-py2.py3-none-any.whl (58 kB)
Requirement already satisfied: setuptools>=34.0.0 in ./venv/lib/python3.7/site-packages (from google-api-core<2dev,>=1.18.0->google-api-python-client) (41.2.0)
Collecting googleapis-common-protos<2.0dev,>=1.6.0
Using cached googleapis_common_protos-1.52.0-py2.py3-none-any.whl (100 kB)
Collecting cachetools<5.0,>=2.0.0
Using cached cachetools-4.1.0-py3-none-any.whl (10 kB)
Collecting pyasn1-modules>=0.2.1
Using cached pyasn1_modules-0.2.8-py2.py3-none-any.whl (155 kB)
Collecting rsa<5,>=3.1.4; python_version >= "3"
Using cached rsa-4.6-py3-none-any.whl (47 kB)
Collecting certifi>=2017.4.17
Using cached certifi-2020.4.5.2-py2.py3-none-any.whl (157 kB)
Collecting urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1
Using cached urllib3-1.25.9-py2.py3-none-any.whl (126 kB)
Collecting chardet<4,>=3.0.2
Using cached chardet-3.0.4-py2.py3-none-any.whl (133 kB)
Collecting idna<3,>=2.5
Using cached idna-2.9-py2.py3-none-any.whl (58 kB)
Collecting pyasn1<0.5.0,>=0.4.6
Using cached pyasn1-0.4.8-py2.py3-none-any.whl (77 kB)
Installing collected packages: six, cachetools, pyasn1, pyasn1-modules, rsa, google-auth, httplib2, google-auth-httplib2, protobuf, pytz, certifi, urllib3, chardet, idna, requests, googleapis-common-protos, google-api-core, uritemplate, google-api-python-client
Successfully installed cachetools-4.1.0 certifi-2020.4.5.2 chardet-3.0.4 google-api-core-1.20.1 google-api-python-client-1.9.3 google-auth-1.17.2 google-auth-httplib2-0.0.3 googleapis-common-protos-1.52.0 httplib2-0.18.1 idna-2.9 protobuf-3.12.2 pyasn1-0.4.8 pyasn1-modules-0.2.8 pytz-2020.1 requests-2.23.0 rsa-4.6 six-1.15.0 uritemplate-3.0.1 urllib3-1.25.9
Is that sample simply outdated? (They use print without () though Python 2.7 seems to be deprecated for google-api-python-client which confused others already.)
I fixed that and still get an ModuleNotFoundError: No module named 'oauth2client'. Am I right that the missing sudo is not the cause for that?
Well, and they do not explain what a VIEW_ID is and where to get this.
It works without sudo for you because you seem to have python installed in a location where your user has write permissions.
Requirement already satisfied: setuptools>=34.0.0 in ./venv/lib/python3.7/site-packages (from google-api-core<2dev,>=1.18.0->google-api-python-client) (41.2.0)
It all depends on how and where you install python. The mac os distro python is installed in /Library/ which is owned by root. So if you want to install a new package, you will need to use sudo.