title: Google API : AttributeError: module 'time' has no attribute 'clock'
body: <p>This is my code :</p>
  <pre><code>from oauth2client.service_account import ServiceAccountCredentials
  from apiclient import discovery
  from httplib2 import Http
  
  key_path = os.environ[&quot;GOOGLE_APPLICATION_CREDENTIALS&quot;]
  
  # define scope
  SCOPE = ['https://spreadsheets.google.com/feeds',
          'https://www.googleapis.com/auth/drive']
  
  # define store
  credentials = ServiceAccountCredentials.from_json_keyfile_name(key_path, SCOPE)
  
  # define API service
  http = credentials.authorize(Http())
  drive = discovery.build('drive', 'v3', http=http) # ERROR HERE
  </code></pre>
  <p>I'm hitting error at <code>drive</code> with error message :</p>
  <blockquote>
  <p>AttributeError: module 'time' has no attribute 'clock'</p>
  </blockquote>
  <p>I'm using Python 3.8. Please help. I can upload error message if needed.</p>
  <p>Error log :</p>
  <pre><code>    File &quot;/Users/mydirectory/Documents/my-project/config.py&quot;, line 36, in &lt;module&gt;
      drive = discovery.build('drive', 'v3', http=http)
    File &quot;/Users/mydirectory/Documents/my-project/venv/lib/python3.8/site-packages/googleapiclient/_helpers.py&quot;, line 134, in positional_wrapper
      return wrapped(*args, **kwargs)
    File &quot;/Users/mydirectory/Documents/my-project/venv/lib/python3.8/site-packages/googleapiclient/discovery.py&quot;, line 270, in build
      content = _retrieve_discovery_doc(
    File &quot;/Users/mydirectory/Documents/my-project/venv/lib/python3.8/site-packages/googleapiclient/discovery.py&quot;, line 376, in _retrieve_discovery_doc
      resp, content = req.execute(num_retries=num_retries)
    File &quot;/Users/mydirectory/Documents/my-project/venv/lib/python3.8/site-packages/googleapiclient/_helpers.py&quot;, line 134, in positional_wrapper
      return wrapped(*args, **kwargs)
    File &quot;/Users/mydirectory/Documents/my-project/venv/lib/python3.8/site-packages/googleapiclient/http.py&quot;, line 900, in execute
      resp, content = _retry_request(
    File &quot;/Users/mydirectory/Documents/my-project/venv/lib/python3.8/site-packages/googleapiclient/http.py&quot;, line 177, in _retry_request
      resp, content = http.request(uri, method, *args, **kwargs)
    File &quot;/Users/mydirectory/Documents/my-project/venv/lib/python3.8/site-packages/oauth2client/transport.py&quot;, line 159, in new_request
      credentials._refresh(orig_request_method)
    File &quot;/Users/mydirectory/Documents/my-project/venv/lib/python3.8/site-packages/oauth2client/client.py&quot;, line 749, in _refresh
      self._do_refresh_request(http)
    File &quot;/Users/mydirectory/Documents/my-project/venv/lib/python3.8/site-packages/oauth2client/client.py&quot;, line 774, in _do_refresh_request
      body = self._generate_refresh_request_body()
    File &quot;/Users/mydirectory/Documents/my-project/venv/lib/python3.8/site-packages/oauth2client/client.py&quot;, line 1484, in _generate_refresh_request_body
      assertion = self._generate_assertion()
    File &quot;/Users/mydirectory/Documents/my-project/venv/lib/python3.8/site-packages/oauth2client/service_account.py&quot;, line 384, in _generate_assertion
      return crypt.make_signed_jwt(self._signer, payload,
    File &quot;/Users/mydirectory/Documents/my-project/venv/lib/python3.8/site-packages/oauth2client/crypt.py&quot;, line 97, in make_signed_jwt
      signature = signer.sign(signing_input)
    File &quot;/Users/mydirectory/Documents/my-project/venv/lib/python3.8/site-packages/oauth2client/_pycrypto_crypt.py&quot;, line 99, in sign
      return PKCS1_v1_5.new(self._key).sign(SHA256.new(message))
    File &quot;/Users/mydirectory/Documents/my-project/venv/lib/python3.8/site-packages/Crypto/Signature/PKCS1_v1_5.py&quot;, line 112, in sign
      m = self._key.decrypt(em)
    File &quot;/Users/mydirectory/Documents/my-project/venv/lib/python3.8/site-packages/Crypto/PublicKey/RSA.py&quot;, line 174, in decrypt
      return pubkey.pubkey.decrypt(self, ciphertext)
    File &quot;/Users/mydirectory/Documents/my-project/venv/lib/python3.8/site-packages/Crypto/PublicKey/pubkey.py&quot;, line 93, in decrypt
      plaintext=self._decrypt(ciphertext)
    File &quot;/Users/mydirectory/Documents/my-project/venv/lib/python3.8/site-packages/Crypto/PublicKey/RSA.py&quot;, line 235, in _decrypt
      r = getRandomRange(1, self.key.n-1, randfunc=self._randfunc)
    File &quot;/Users/mydirectory/Documents/my-project/venv/lib/python3.8/site-packages/Crypto/Util/number.py&quot;, line 123, in getRandomRange
      value = getRandomInteger(bits, randfunc)
    File &quot;/Users/mydirectory/Documents/my-project/venv/lib/python3.8/site-packages/Crypto/Util/number.py&quot;, line 104, in getRandomInteger
      S = randfunc(N&gt;&gt;3)
    File &quot;/Users/mydirectory/Documents/my-project/venv/lib/python3.8/site-packages/Crypto/Random/_UserFriendlyRNG.py&quot;, line 202, in read
      return self._singleton.read(bytes)
    File &quot;/Users/mydirectory/Documents/my-project/venv/lib/python3.8/site-packages/Crypto/Random/_UserFriendlyRNG.py&quot;, line 178, in read
      return _UserFriendlyRNG.read(self, bytes)
    File &quot;/Users/mydirectory/Documents/my-project/venv/lib/python3.8/site-packages/Crypto/Random/_UserFriendlyRNG.py&quot;, line 129, in read
      self._ec.collect()
    File &quot;/Users/mydirectory/Documents/my-project/venv/lib/python3.8/site-packages/Crypto/Random/_UserFriendlyRNG.py&quot;, line 77, in collect
      t = time.clock()
  AttributeError: module 'time' has no attribute 'clock'
  </code></pre>