0

I am testing the Google Street View Publish API so I installed the library gapic-google-maps-streetview_publish-v1 and then I tried running the Python code example to upload a photo.

In the line:

from google.streetview.publish.v1 import street_view_publish_service_client as client

the code raises an error:

pkg_resources.DistributionNotFound: google-gax

According to my package list, google-gax==0.15.16 is included in the installation of gapic-google-maps-streetview_publish-v1. I have tried updating to 0.16.0 but it doesn't work either.

Any hint to fix this?

EDIT:

pip freeze

cachetools==2.1.0
certifi==2018.4.16
chardet==3.0.4
dill==0.2.8.1
enum34==1.1.6
future==0.16.0
futures==3.2.0
gapic-google-maps-streetview-publish-v1==0.1.4
google-auth==1.5.0
google-gax==0.15.16
googleapis-common-protos==1.5.3
grpcio==1.12.1
httplib2==0.11.3
idna==2.7
oauth2client==3.0.0
ply==3.8
proto-google-maps-streetview-publish-v1==0.1.4
protobuf==3.6.0
pyasn1==0.4.3
pyasn1-modules==0.2.1
pyreadline==2.1
requests==2.19.1
rsa==3.4.2
six==1.11.0
urllib3==1.23
Finfa811
  • 618
  • 1
  • 8
  • 28
  • Can you provide your pip commands? or requirements.txt file? How are you doing dependencies installation? – J.L Valtueña Jun 22 '18 at 11:26
  • @J.LValtueña question is edited with my `pip freeze`. I have created a virtualenv and just installed `gapic-google-maps-streetview_publish-v1` after a clean installation. Still raising the same error. – Finfa811 Jun 22 '18 at 13:12

2 Answers2

0

I encountered this before and I used

pip install virtualenv
virtualenv <your-env>
source <your-env>/bin/activate
<your-env>/bin/pip install gapic-google-maps-streetview_publish-v1

it's worth a try. Hope this helps

droidBomb
  • 850
  • 5
  • 8
  • That is the solution I have tried from the beginning. I even did a clean uninstall/reinstall of Python 2.7.15 and the Google Cloud SDK and still getting the same issue... – Finfa811 Jun 22 '18 at 13:07
  • @Finfa811 I added my pip freeze below. We have the same one except for pyreadline (i don't have one). Also when I installed my python pip, i just used `sudo easy_install pip`. – droidBomb Jun 22 '18 at 14:19
  • `pyreadline`is a readline API on Windows, I don't think it makes any difference – Finfa811 Jun 22 '18 at 14:26
  • Are you able to work with the Street View Publish API then? – Finfa811 Jun 22 '18 at 15:45
  • @Finfa811 yes, I'm able to work on it. I don't understand why you're having errors. I too used the python code example. – droidBomb Jun 22 '18 at 17:23
  • I have found the solution. The Google App Engine was causing conflicts with the code because it includes a very old version of `setuptools` in the distribution. Just need to disable GAE support to make the test code work. I opened a new [issue](https://github.com/GoogleCloudPlatform/google-cloud-python/issues/5527) in Github regarding the question. – Finfa811 Jun 22 '18 at 19:23
0

Seems like google-gax is deprecated (https://pypi.org/project/google-gax/) it has been wholly replaced by google-api-core (https://pypi.org/project/google-api-core/).

J.L Valtueña
  • 403
  • 2
  • 11
  • I see, but `google-gax` is automatically installed with the `gapic-google-maps-streetview_publish-v1` package. And it is called in `street_view_publish_service_client.py`, in the line `from google.gax import api_callable`. So if `google-gax` is deprecated, there is no way to use the Street View Publish API until a new version is deployed, isn't there? – Finfa811 Jun 22 '18 at 14:30