Unresolved Import RingCentral

  • 1
  • Question
  • Updated 3 months ago
Getting unresolved import exception using these in Python 3.7 These work in 3.6...What am I doing wrong?
from ringcentral_client import PubNub
from ringcentral_client import RestClient, SANDBOX_SERVER

Photo of Rick Smith

Rick Smith

  • 442 Points 250 badge 2x thumb

Posted 3 months ago

  • 1
Photo of Tyler Long

Tyler Long, Official Rep

  • 9,486 Points 5k badge 2x thumb
Are you talking about this SDK? https://github.com/tylerlong/ringcentral-python
Photo of Rick Smith

Rick Smith

  • 442 Points 250 badge 2x thumb
I believe so.
Photo of Tyler Long

Tyler Long, Official Rep

  • 9,486 Points 5k badge 2x thumb
I tried pipenv and it worked for me:

test python -V
Python 3.7.2
➜  test pipenv install ringcentral_client
Installing ringcentral_client...
Adding ringcentral_client to Pipfile's [packages]...
✔ Installation Succeeded
Installing dependencies from Pipfile.lock (f81978)...
 
Photo of Tyler Long

Tyler Long, Official Rep

  • 9,486 Points 5k badge 2x thumb
Content of index.py:

from ringcentral_client import RestClient, SANDBOX_SERVER
import os
rc = RestClient(os.environ.get('RINGCENTRAL_CLIENT_ID'), os.environ.get('RINGCENTRAL_CLIENT_SECRET'), SANDBOX_SERVER)
rc.authorize(os.environ.get('RINGCENTRAL_USERNAME'),os.environ.get('RINGCENTRAL_EXTENSION'),os.environ.get('RINGCENTRAL_PASSWORD'))
print(rc.token)