{"action":"closed","issue":{"url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-python/issues/5043","repository_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-python","labels_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-python/issues/5043/labels{/name}","comments_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-python/issues/5043/comments","events_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-python/issues/5043/events","html_url":"https://github.com/GoogleCloudPlatform/google-cloud-python/issues/5043","id":305528923,"number":5043,"title":"container: container_v1 not importable - dependency issue?","user":{"login":"hawksight","id":11051419,"avatar_url":"https://avatars1.githubusercontent.com/u/11051419?v=4","gravatar_id":"","url":"https://api.github.com/users/hawksight","html_url":"https://github.com/hawksight","followers_url":"https://api.github.com/users/hawksight/followers","following_url":"https://api.github.com/users/hawksight/following{/other_user}","gists_url":"https://api.github.com/users/hawksight/gists{/gist_id}","starred_url":"https://api.github.com/users/hawksight/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hawksight/subscriptions","organizations_url":"https://api.github.com/users/hawksight/orgs","repos_url":"https://api.github.com/users/hawksight/repos","events_url":"https://api.github.com/users/hawksight/events{/privacy}","received_events_url":"https://api.github.com/users/hawksight/received_events","type":"User","site_admin":false},"labels":[{"id":785086681,"url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-python/labels/api:%20container","name":"api: container","color":"f8f8f8","default":false},{"id":131855319,"url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-python/labels/packaging","name":"packaging","color":"bfdadc","default":false},{"id":77438584,"url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-python/labels/type:%20question","name":"type: question","color":"c5def5","default":false}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2018-03-15T12:18:27Z","updated_at":"2018-03-15T18:14:20Z","closed_at":"2018-03-15T18:14:20Z","author_association":"NONE","body":"Hello, I've been trying to install and play with `google-cloud-container` library but I am having issues following the quickstart as described [here](https://github.com/GoogleCloudPlatform/google-cloud-python/blob/b11b3a12a22bfe8a7844a56a655e24f450c9012c/container/README.rst).\r\n\r\nEvery time I try to: `from google.cloud import container_v1`\r\nI get: `DistributionNotFound: The 'google-api-core' distribution was not found and is required by the application`\r\n\r\nI use gcloud CLI every day and the right API is enabled in the project I am working with.\r\n\r\nI've tried in several different virtual envs, hence reproduce steps are pretty simple. Seem some similar issues on googling but not related this this library. Any help appreciated.\r\n\r\n2. OS type and version : MacOS High Sierra - 10.13.3\r\n3. Python version and virtual environment information `python --version` : `Python 3.6.4`\r\n4. google-cloud-python version `pip show google-cloud`, `pip show google-<service>` or `pip freeze`\r\n```\r\n(venv) ➜  scripts git:(gke-1-9) ✗ pip show google-cloud-container\r\nName: google-cloud-container\r\nVersion: 0.1.1\r\nSummary: Google Container Engine API client library\r\nHome-page: https://github.com/GoogleCloudPlatform/google-cloud-python\r\nAuthor: Google LLC\r\nAuthor-email: googleapis-packages@google.com\r\nLicense: Apache 2.0\r\nLocation: /Users/pfiddes/Projects/kubernetes/venv/lib/python3.6/site-packages\r\nRequires: google-api-core\r\n```\r\n\r\nfreeze on my actual env, not a brand new one (which doesn't work either)\r\n```\r\n(venv) ➜  scripts git:(gke-1-9) ✗ pip freeze\r\nappnope==0.1.0\r\nasn1crypto==0.24.0\r\nboto3==1.5.22\r\nbotocore==1.8.36\r\ncachetools==2.0.1\r\ncertifi==2018.1.18\r\ncffi==1.11.4\r\nchardet==3.0.4\r\nclick==6.7\r\ncolorama==0.3.9\r\ncolorclass==2.2.0\r\ncredstash==1.14.0\r\ncryptography==2.0\r\ndecorator==4.2.1\r\ndocopt==0.6.2\r\ndocutils==0.14\r\ngoogle-api-core==1.0.0\r\ngoogle-auth==1.3.0\r\ngoogle-cloud-container==0.1.1\r\ngoogleapis-common-protos==1.5.3\r\ngrpcio==1.10.0\r\nhttplib2==0.10.3\r\nidna==2.6\r\nipaddress==1.0.19\r\nipython==6.2.1\r\nipython-genutils==0.2.0\r\njedi==0.11.1\r\nJinja2==2.10\r\njmespath==0.9.3\r\nkubernetes==4.0.0\r\nMarkupSafe==1.0\r\noauth2client==4.1.2\r\noauthlib==2.0.6\r\npackaging==16.8\r\nparso==0.1.1\r\npexpect==4.3.1\r\npickleshare==0.7.4\r\npip-upgrader==1.4.4\r\nplumbum==1.6.5\r\nprompt-toolkit==1.0.15\r\nprotobuf==3.5.2\r\nptyprocess==0.5.2\r\npyasn1==0.4.2\r\npyasn1-modules==0.2.1\r\npycparser==2.18\r\nPygments==2.2.0\r\npyparsing==2.2.0\r\npython-dateutil==2.6.1\r\npytz==2018.3\r\nPyYAML==3.12\r\nrequests==2.18.4\r\nrequests-oauthlib==0.8.0\r\nrsa==3.4.2\r\ns3transfer==0.1.12\r\nsimplegeneric==0.8.1\r\nsix==1.11.0\r\nterminaltables==3.1.0\r\ntraitlets==4.3.2\r\nurllib3==1.22\r\nwcwidth==0.1.7\r\nwebsocket-client==0.46.0\r\n```\r\n\r\n5. Stacktrace if available - Ran from ipython:\r\n```\r\nIn [1]: from google.cloud import container_v1\r\n---------------------------------------------------------------------------\r\nDistributionNotFound                      Traceback (most recent call last)\r\n<ipython-input-1-6685c094e0c1> in <module>()\r\n----> 1 from google.cloud import container_v1\r\n\r\n~/Projects/kubernetes/venv/lib/python3.6/site-packages/google/cloud/container_v1/__init__.py in <module>()\r\n     15 from __future__ import absolute_import\r\n     16\r\n---> 17 from google.cloud.container_v1 import types\r\n     18 from google.cloud.container_v1.gapic import cluster_manager_client\r\n     19 from google.cloud.container_v1.gapic import enums\r\n\r\n~/Projects/kubernetes/venv/lib/python3.6/site-packages/google/cloud/container_v1/types.py in <module>()\r\n     16 import sys\r\n     17\r\n---> 18 from google.api_core.protobuf_helpers import get_messages\r\n     19\r\n     20 from google.api import http_pb2\r\n\r\n~/Projects/kubernetes/venv/lib/python3.6/site-packages/google/api_core/__init__.py in <module>()\r\n     21\r\n     22\r\n---> 23 __version__ = get_distribution('google-api-core').version\r\n\r\n/usr/local/lib/python3.6/site-packages/pkg_resources/__init__.py in get_distribution(dist)\r\n    577         dist = Requirement.parse(dist)\r\n    578     if isinstance(dist, Requirement):\r\n--> 579         dist = get_provider(dist)\r\n    580     if not isinstance(dist, Distribution):\r\n    581         raise TypeError(\"Expected string, Requirement, or Distribution\", dist)\r\n\r\n/usr/local/lib/python3.6/site-packages/pkg_resources/__init__.py in get_provider(moduleOrReq)\r\n    449     \"\"\"Return an IResourceProvider for the named module or requirement\"\"\"\r\n    450     if isinstance(moduleOrReq, Requirement):\r\n--> 451         return working_set.find(moduleOrReq) or require(str(moduleOrReq))[0]\r\n    452     try:\r\n    453         module = sys.modules[moduleOrReq]\r\n\r\n/usr/local/lib/python3.6/site-packages/pkg_resources/__init__.py in require(self, *requirements)\r\n    997         included, even if they were already activated in this working set.\r\n    998         \"\"\"\r\n--> 999         needed = self.resolve(parse_requirements(requirements))\r\n   1000\r\n   1001         for dist in needed:\r\n\r\n/usr/local/lib/python3.6/site-packages/pkg_resources/__init__.py in resolve(self, requirements, env, installer, replace_conflicting, extras)\r\n    883                     if dist is None:\r\n    884                         requirers = required_by.get(req, None)\r\n--> 885                         raise DistributionNotFound(req, requirers)\r\n    886                 to_activate.append(dist)\r\n    887             if dist not in req:\r\n\r\nDistributionNotFound: The 'google-api-core' distribution was not found and is required by the application\r\n```\r\n\r\n6. Steps to reproduce\r\n```\r\npython3 -m venv venv\r\nsource venv/bin/activate\r\npip3 install -U pip setuptools wheel\r\npip3 install google-cloud-container\r\npip3 install ipython\r\nipython\r\n# run: `from google.cloud import container_v1`\r\npip3 install google-cloud\r\nipython3\r\n# run: `from google.cloud import container_v1`\r\n```\r\nAlways get error:\r\n```\r\nIn [1]: from google.cloud import Container_v1\r\n---------------------------------------------------------------------------\r\nImportError                               Traceback (most recent call last)\r\n<ipython-input-1-5f5cbd599f55> in <module>()\r\n----> 1 from google.cloud import Container_v1\r\n\r\nImportError: cannot import name 'Container_v1'\r\n\r\nIn [2]: from google.cloud import container_v1\r\n---------------------------------------------------------------------------\r\nDistributionNotFound                      Traceback (most recent call last)\r\n<ipython-input-2-6685c094e0c1> in <module>()\r\n----> 1 from google.cloud import container_v1\r\n\r\n~/temp/venv/lib/python3.6/site-packages/google/cloud/container_v1/__init__.py in <module>()\r\n     15 from __future__ import absolute_import\r\n     16\r\n---> 17 from google.cloud.container_v1 import types\r\n     18 from google.cloud.container_v1.gapic import cluster_manager_client\r\n     19 from google.cloud.container_v1.gapic import enums\r\n\r\n~/temp/venv/lib/python3.6/site-packages/google/cloud/container_v1/types.py in <module>()\r\n     16 import sys\r\n     17\r\n---> 18 from google.api_core.protobuf_helpers import get_messages\r\n     19\r\n     20 from google.api import http_pb2\r\n\r\n~/temp/venv/lib/python3.6/site-packages/google/api_core/__init__.py in <module>()\r\n     21\r\n     22\r\n---> 23 __version__ = get_distribution('google-api-core').version\r\n\r\n/usr/local/lib/python3.6/site-packages/pkg_resources/__init__.py in get_distribution(dist)\r\n    577         dist = Requirement.parse(dist)\r\n    578     if isinstance(dist, Requirement):\r\n--> 579         dist = get_provider(dist)\r\n    580     if not isinstance(dist, Distribution):\r\n    581         raise TypeError(\"Expected string, Requirement, or Distribution\", dist)\r\n\r\n/usr/local/lib/python3.6/site-packages/pkg_resources/__init__.py in get_provider(moduleOrReq)\r\n    449     \"\"\"Return an IResourceProvider for the named module or requirement\"\"\"\r\n    450     if isinstance(moduleOrReq, Requirement):\r\n--> 451         return working_set.find(moduleOrReq) or require(str(moduleOrReq))[0]\r\n    452     try:\r\n    453         module = sys.modules[moduleOrReq]\r\n\r\n/usr/local/lib/python3.6/site-packages/pkg_resources/__init__.py in require(self, *requirements)\r\n    997         included, even if they were already activated in this working set.\r\n    998         \"\"\"\r\n--> 999         needed = self.resolve(parse_requirements(requirements))\r\n   1000\r\n   1001         for dist in needed:\r\n\r\n/usr/local/lib/python3.6/site-packages/pkg_resources/__init__.py in resolve(self, requirements, env, installer, replace_conflicting, extras)\r\n    883                     if dist is None:\r\n    884                         requirers = required_by.get(req, None)\r\n--> 885                         raise DistributionNotFound(req, requirers)\r\n    886                 to_activate.append(dist)\r\n    887             if dist not in req:\r\n\r\nDistributionNotFound: The 'google-api-core' distribution was not found and is required by the application\r\n```\r\nFreeze on a clean env:\r\n```\r\nappnope==0.1.0\r\ncachetools==2.0.1\r\ncertifi==2018.1.18\r\nchardet==3.0.4\r\ndecorator==4.2.1\r\ndill==0.2.7.1\r\nfuture==0.16.0\r\ngapic-google-cloud-datastore-v1==0.15.3\r\ngapic-google-cloud-error-reporting-v1beta1==0.15.3\r\ngapic-google-cloud-logging-v2==0.91.3\r\ngoogle-api-core==0.1.4\r\ngoogle-auth==1.4.1\r\ngoogle-cloud==0.32.0\r\ngoogle-cloud-bigquery==0.28.0\r\ngoogle-cloud-bigquery-datatransfer==0.1.1\r\ngoogle-cloud-bigtable==0.28.1\r\ngoogle-cloud-container==0.1.1\r\ngoogle-cloud-core==0.28.1\r\ngoogle-cloud-datastore==1.4.0\r\ngoogle-cloud-dns==0.28.0\r\ngoogle-cloud-error-reporting==0.28.0\r\ngoogle-cloud-firestore==0.28.0\r\ngoogle-cloud-language==1.0.1\r\ngoogle-cloud-logging==1.4.0\r\ngoogle-cloud-monitoring==0.28.1\r\ngoogle-cloud-pubsub==0.30.1\r\ngoogle-cloud-resource-manager==0.28.1\r\ngoogle-cloud-runtimeconfig==0.28.1\r\ngoogle-cloud-spanner==0.29.0\r\ngoogle-cloud-speech==0.30.0\r\ngoogle-cloud-storage==1.6.0\r\ngoogle-cloud-trace==0.17.0\r\ngoogle-cloud-translate==1.3.1\r\ngoogle-cloud-videointelligence==1.0.1\r\ngoogle-cloud-vision==0.29.0\r\ngoogle-gax==0.15.16\r\ngoogle-resumable-media==0.3.1\r\ngoogleapis-common-protos==1.5.3\r\ngrpc-google-iam-v1==0.11.4\r\ngrpcio==1.10.0\r\nhttplib2==0.10.3\r\nidna==2.6\r\nipython==6.2.1\r\nipython-genutils==0.2.0\r\njedi==0.11.1\r\noauth2client==3.0.0\r\nparso==0.1.1\r\npexpect==4.4.0\r\npickleshare==0.7.4\r\nply==3.8\r\nprompt-toolkit==1.0.15\r\nproto-google-cloud-datastore-v1==0.90.4\r\nproto-google-cloud-error-reporting-v1beta1==0.15.3\r\nproto-google-cloud-logging-v2==0.91.3\r\nprotobuf==3.5.2\r\npsutil==5.4.3\r\nptyprocess==0.5.2\r\npyasn1==0.4.2\r\npyasn1-modules==0.2.1\r\nPygments==2.2.0\r\npytz==2018.3\r\nrequests==2.18.4\r\nrsa==3.4.2\r\nsimplegeneric==0.8.1\r\nsix==1.11.0\r\ntraitlets==4.3.2\r\nurllib3==1.22\r\nwcwidth==0.1.7\r\n```\r\n\r\nSome pip shows:\r\n```\r\n(venv) ➜  temp pip3 show google-cloud-container\r\nName: google-cloud-container\r\nVersion: 0.1.1\r\nSummary: Google Container Engine API client library\r\nHome-page: https://github.com/GoogleCloudPlatform/google-cloud-python\r\nAuthor: Google LLC\r\nAuthor-email: googleapis-packages@google.com\r\nLicense: Apache 2.0\r\nLocation: /Users/pfiddes/temp/venv/lib/python3.6/site-packages\r\nRequires: google-api-core\r\n(venv) ➜  temp pip3 show google-api-core\r\nName: google-api-core\r\nVersion: 0.1.4\r\nSummary: Core Google API Client Library\r\nHome-page: https://github.com/GoogleCloudPlatform/google-cloud-python\r\nAuthor: Google Cloud Platform\r\nAuthor-email: googleapis-publisher@google.com\r\nLicense: Apache 2.0\r\nLocation: /Users/pfiddes/temp/venv/lib/python3.6/site-packages\r\nRequires: requests, googleapis-common-protos, protobuf, pytz, setuptools, google-auth, six\r\n(venv) ➜  temp pip3 show google-cloud\r\nName: google-cloud\r\nVersion: 0.32.0\r\nSummary: API Client library for Google Cloud\r\nHome-page: https://github.com/GoogleCloudPlatform/google-cloud-python\r\nAuthor: Google Cloud Platform\r\nAuthor-email: googleapis-publisher@google.com\r\nLicense: Apache 2.0\r\nLocation: /Users/pfiddes/temp/venv/lib/python3.6/site-packages\r\nRequires: google-cloud-core, google-cloud-bigquery, google-cloud-trace, google-cloud-runtimeconfig, google-api-core, google-cloud-speech, google-cloud-spanner, google-cloud-pubsub, google-cloud-translate, google-cloud-vision, google-cloud-resource-manager, google-cloud-bigtable, google-cloud-videointelligence, google-cloud-monitoring, google-cloud-container, google-cloud-datastore, google-cloud-dns, google-cloud-storage, google-cloud-language, google-cloud-firestore, google-cloud-error-reporting, google-cloud-logging, google-cloud-bigquery-datatransfer\r\n```\r\n\r\n7. Code example - None yet, can't import the package"}}
{"actor":{"display_login":"tseaver"}}