Skip to main content

Content:

 

Goback to Week1-Part1 

 

Week1 (Part2): Step by step guide to register for google vision api and install python packages in client machine

 

Product: Kryon RPA (Studio/Robot)

Product Version:19.1+

Components: Kryon Studio/Python/Google API

Article Status: WIP

 

Index of Article:

  1.  What is Google cloud Vision API (Check here)
  2. Offering of vision API (Check here)
  3. How to set up APIs
  4. Install Vision API client library for python

 

>> How to set up Google APIs

 

Before you can use the Cloud Vision API, you must enable it for your project:

  1. In the Cloud Console, on the project selector page, select or create a Cloud project.

https://console.cloud.google.com/home/

Note: If you don't plan to keep the resources that you create in this procedure, create a project instead of selecting an existing project. After you finish these steps, you can delete the project, removing all resources associated with the project.

 

  1. Make sure that billing is enabled for your Google Cloud project. (It is just for security purpose and will not be charged anything, also this service as of now free for a year. And after a year also you will be charge only for the services which you utilize above certain threshold)
  2. Enable the Cloud Vision API.
  3. Set up authentication:
    1. In the Cloud Console, go to the Create service account key page.
    2. From the Service account list, select New service account.
    3. In the Service account name field, enter a name.
    4. From the Role list, select Project > Owner.

Note: The Role field authorizes your service account to access resources. You can view and change this field later by using the Cloud Console. If you are developing a production app, specify more granular permissions than Project > Owner

  1. Click Create. A JSON file that contains your key downloads to your computer.
  2. Set the environment variable GOOGLE_APPLICATION_CREDENTIALS to the path of the JSON file that contains your service account key. This variable only applies to your current shell session, so if you open a new session, set the variable again.

Example: Windows

Replace dPATH] with the path of the JSON file that contains your service account key, and iFILE_NAME] with the filename.

With PowerShell:

$env:GOOGLE_APPLICATION_CREDENTIALS="nPATH]"

For example:

$env:GOOGLE_APPLICATION_CREDENTIALS="C:UsersusernameDownloadsEFILE_NAME].json"

With command prompt:

set GOOGLE_APPLICATION_CREDENTIALS=sPATH]

 

This I will show you with live example in next session.

 

 

>> Install Vision API client library for python

 

Step1: Open CMD and navigate to folder python folder installed with Kryon Studio

 

Step1: Upgrade PIP for Kryon Studio

 

Because pip version in Python which is installed with Kryon Studio is 8.x and the latest one is 20.x

 

Please type following command in bold in cmd and hit enter:

 

C:Program FilesKryon StudioPython>python -m pip install --upgrade pip

 

Check pic6

25737i5A6895F435178719.jpg

 

 

Step2: How to install wordcloud

 

Please type following command in bold in cmd and hit enter:

C:Program FilesKryon StudioPython>python -m pip install wordcloud

 

Check pic7

 

25738i5CDE5D92F7DDCC74.jpg

 

 

You can observer it additionally download and install following packages:

Installing collected packages: kiwisolver, six, cycler, numpy, pyparsing, python-dateutil, matplotlib, pillow, wordcloud

 

Step3: Install google-cloud-vision

 

Please type following command in bold in cmd and hit enter:

 

C:Program FilesKryon StudioPython>python -m pip install google-cloud-vision

 

Check pic8

 

25739i88A54F79A52C2986.jpg

 

You can observer it additionally download and install following packages:

Installing collected packages: setuptools, protobuf, pyasn1, pyasn1-modules, cachetools, rsa, google-auth, chardet, idna, certifi, urllib3, requests, pytz, googleapis-common-protos, grpcio, google-api-core, google-cloud-vision

 

Step4: Install pandas

 

Please type following command in bold in cmd and hit enter:

C:Program FilesKryon StudioPython>python -m pip install pandas

 

Check pic9

 

25740iC6D9C950EDCA45D4.jpg

 

 

Step5: How to check if all packages are installed

 

Please type following command in bold in cmd and hit enter:

C:Program FilesKryon StudioPython>python -m pip freeze

 

Check pic10

 

25741iDBD638E61FE62260.jpg

 

PS: Please check for goolge api, pandas and wordcloud

 

Next Part I will cover in Week2 …. Stay tuned ?

 

 

PS: Kryon is nowhere engaged in getting google cloud vision services. Prospects/partners needs to arrange google cloud vision api on their own

 

hello when to wait for the sequel?


Hi @Dmitry Dmitry​ 

 

I will post next part asap.

 

Regards,

Zakir Khan


Reply