下面是代码
import httplib2, argparse, os, sys, json
from oauth2client import tools, file, client
from oauth2client.service_account import ServiceAccountCredentials
from googleapiclient import discovery
from googleapiclient.errors import HttpError
scope = ['https://www.googleapis.com/auth/prediction','https://www.googleapis.com/auth/devstorage.read_only']
def get_api(api, scope, service_account=True):
storage = file.Storage('oAuth2.json')
creds = storage.get()
if creds is None or creds.invalid:
creds = ServiceAccountCredentials.from_json_keyfile_name('service_account.json',
scopes=scope)
storage.put(creds)
http = creds.authorize(httplib2.Http())
return discovery.build(api, 'v1.6', http=http)
api = get_prediction_api('prediction')
下面是错误
TypeError:无法实例化未知大小的 ctype 'EVP_MD_CTX'
基于这个博客