title: PyInstaller file fails to execute script - DistributionNotFound
body: <p>I'm trying to convert my python file to an executable using PyInstaller. The program uses the <a href="https://cloud.google.com/translate/docs/" rel="noreferrer">Google Cloud Translate API</a> to translate given text between languages. When running <code>python quicktrans.py</code> in the terminal, the program works fine. Then I ran <code>pyinstaller quicktrans.py</code>, SHIFT + right-clicked the directory the executable was in, and ran the .exe file in the terminal. This is the traceback that it spit out (Note this is not the whole traceback because it is a little lengthy):</p>
  
  <pre><code>File "c:\users\kalab\realpython\quicktrans\google\cloud\connection.py", line 31, in &lt;module&gt;
      get_distribution('google-cloud-core').version)
    File "site-packages\pkg_resources\__init__.py", line 559, in get_distribution
    File "site-packages\pkg_resources\__init__.py", line 433, in get_provider
    File "site-packages\pkg_resources\__init__.py", line 970, in require
    File "site-packages\pkg_resources\__init__.py", line 856, in resolve
  pkg_resources.DistributionNotFound: The 'google-cloud-core' distribution was not found and is required by the application
  Failed to execute script quicktrans
  </code></pre>
  
  <p>I've tried looking into this and some reason it's giving me a pip-like error. I've been trying to fix this for hours and no luck.
  Note: To install its client library, as per the <a href="https://cloud.google.com/translate/docs/reference/libraries#installing_the_client_library" rel="noreferrer">documentation</a>, you must run <code>pip install --upgrade google-cloud-translate</code>
  <p> I'm thinking this might have <em>something</em> to do with this because the last application I used dealt with the Facebook client module and you only had to do <code>pip install facebook-sdk</code> and the executable made by PyInstaller ran with no issues.</p>
  
  <p><p> If you want to examine my code used in my program, <a href="https://github.com/Kalaborative/Project-ziablo/blob/master/quicktrans.py" rel="noreferrer">it's hosted on my GitHub</a>.
  <p> Thanks to anyone helping me out here!</p>