title: ImportError: cannot import name language in Google Cloud Language API
body: <p>I am trying to use this sample code from the Google Natural Language API to get a sentiment score back. However, each time I run the code, I get an "ImportError: cannot import name language." error on the first line. </p>
  
  <p>I have pip installed the library, tried uninstalling and reinstalling, made the credentials on the console (the API is shown to be enabled) and looked at this tutorial too and completed those steps in the answer: <a href="https://stackoverflow.com/questions/45255324/google-sentiment-analysis-importerror-cannot-import-name-language">Google sentiment analysis - ImportError: cannot import name language</a>. It hasn't helped. Is there anything else I can try?</p>
  
  <pre><code>from google.cloud import language
  from google.cloud.language import enums
  from google.cloud.language import types
  
  client = language.LanguageServiceClient()
  
  text = u'Hello, world!'
  document = types.Document(
      content=text,
      type=enums.Document.Type.PLAIN_TEXT)
  
  sentiment = client.analyze_sentiment(document=document).document_sentiment
  
  print('Text: {}'.format(text))
  print('Sentiment: {}, {}'.format(sentiment.score, sentiment.magnitude))
  </code></pre>
  
  <p>I also have pasted this into my terminal with the proper path. </p>
  
  <pre><code>export GOOGLE_APPLICATION_CREDENTIALS="/....(my path)/service_key.json"
  </code></pre>
  
  <p>Stack trace:</p>
  
  <pre><code>Traceback (most recent call last):
    File "lang.py", line 3, in &lt;module&gt;
      from google.cloud import language
    File "/usr/local/Cellar/python/2.7.13/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/google/cloud/language.py", line 17, in &lt;module&gt;
      from google.cloud.language_v1 import LanguageServiceClient
    File "/usr/local/Cellar/python/2.7.13/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/google/cloud/language_v1/__init__.py", line 17, in &lt;module&gt;
      from google.cloud.language_v1 import types
    File "/usr/local/Cellar/python/2.7.13/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/google/cloud/language_v1/types.py", line 18, in &lt;module&gt;
      from google.api_core.protobuf_helpers import get_messages
    File "/usr/local/Cellar/python/2.7.13/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/google/api_core/__init__.py", line 20, in &lt;module&gt;
      from pkg_resources import get_distribution
    File "/usr/local/lib/python2.7/site-packages/pkg_resources/__init__.py", line 3161, in &lt;module&gt;
      @_call_aside
    File "/usr/local/lib/python2.7/site-packages/pkg_resources/__init__.py", line 3145, in _call_aside
      f(*args, **kwargs)
    File "/usr/local/lib/python2.7/site-packages/pkg_resources/__init__.py", line 3189, in _initialize_master_working_set
      for dist in working_set
    File "/usr/local/lib/python2.7/site-packages/pkg_resources/__init__.py", line 3189, in &lt;genexpr&gt;
      for dist in working_set
    File "/usr/local/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2715, in activate
      declare_namespace(pkg)
    File "/usr/local/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2274, in declare_namespace
      _handle_ns(packageName, path_item)
    File "/usr/local/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2209, in _handle_ns
      loader.load_module(packageName)
    File "/usr/local/Cellar/python/2.7.13/Frameworks/Python.framework/Versions/2.7/lib/python2.7/pkgutil.py", line 246, in load_module
      mod = imp.load_module(fullname, self.file, self.filename, self.etc)
    File "/.../lang.py", line 3, in &lt;module&gt;
      from google.cloud import language
  ImportError: cannot import name language
  </code></pre>