请怜悯一个菜鸟问题。
我正在使用python(https://cloud.google.com/speech/docs/rest-tutorial)浏览google语音api教程,并完成了以下操作:
$ export GOOGLE_APPLICATION_CREDENTIALS = my_service_account.json
和
$ export GCLOUD_PROJECT = my_project_id
现在我跑
$ python tutorial.py audio.raw
我得到以下追溯。
> 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'
我做了一些关于“Cryptography_HAS_RSA_OAEP_MD”的搜索,但无济于事。有人可以指点我到哪里错了吗?谢谢!