please have mercy on a noob question.
I was going over the google voice api tutorial with python (https://cloud.google.com/speech/docs/rest-tutorial) and have done the following:
- set up a Cloud Speed API project on Google Console
- Generated / saved google service credential json file
- Installed google-api-python-client==1.5.4 and switched to python 3.5 env
- Saved transcribe.py code from tutorial
- Saved sample audio.raw file from tutorial
- Authenticated by executing:
$ export GOOGLE_APPLICATION_CREDENTIALS=my_service_account.json
and
$ export GCLOUD_PROJECT=my_project_id
Now when I run
$ python tutorial.py audio.raw
I get the following tracebacks.
> Traceback (most recent call last): File "tutorial.py", line 23,
> in <module>
> from googleapiclient import discovery File "/Users/bonjuice/anaconda/envs/py35/lib/python3.5/site-packages/googleapiclient/discovery.py",
> line 73, in <module>
> from oauth2client.client import GoogleCredentials File "/Users/bonjuice/anaconda/envs/py35/lib/python3.5/site-packages/oauth2client/client.py",
> line 45, in <module>
> from oauth2client import crypt File "/Users/bonjuice/anaconda/envs/py35/lib/python3.5/site-packages/oauth2client/crypt.py",
> line 45, in <module>
> from oauth2client import _openssl_crypt File "/Users/bonjuice/anaconda/envs/py35/lib/python3.5/site-packages/oauth2client/_openssl_crypt.py",
> line 16, in <module>
> from OpenSSL import crypto File "/Users/bonjuice/anaconda/envs/py35/lib/python3.5/site-packages/OpenSSL/__init__.py",
> line 8, in <module>
> from OpenSSL import rand, crypto, SSL File "/Users/bonjuice/anaconda/envs/py35/lib/python3.5/site-packages/OpenSSL/rand.py",
> line 12, in <module>
> from OpenSSL._util import ( File "/Users/bonjuice/anaconda/envs/py35/lib/python3.5/site-packages/OpenSSL/_util.py",
> line 6, in <module>
> from cryptography.hazmat.bindings.openssl.binding import Binding File
> "/Users/bonjuice/anaconda/envs/py35/lib/python3.5/site-packages/cryptography/hazmat/bindings/openssl/binding.py",
> line 234, in <module>
> Binding.init_static_locks() File "/Users/bonjuice/anaconda/envs/py35/lib/python3.5/site-packages/cryptography/hazmat/bindings/openssl/binding.py",
> line 180, in init_static_locks
> cls._ensure_ffi_initialized() File "/Users/bonjuice/anaconda/envs/py35/lib/python3.5/site-packages/cryptography/hazmat/bindings/openssl/binding.py",
> line 167, in _ensure_ffi_initialized
> cls.lib = build_conditional_library(lib, CONDITIONAL_NAMES) File "/Users/bonjuice/anaconda/envs/py35/lib/python3.5/site-packages/cryptography/hazmat/bindings/openssl/binding.py",
> line 104, in build_conditional_library
> if not getattr(lib, condition): AttributeError: cffi library '_openssl' has no function, constant or global variable named
> 'Cryptography_HAS_RSA_OAEP_MD'
I did some searching on "Cryptography_HAS_RSA_OAEP_MD" but to no avail. Could someone please point me to where I got wrong? Thanks!