# hubspot-api-client Distribution

**URL:** <https://community.hubspot.com/t/hubspot-api-client-distribution/39625>\
**Category:** APIs & Integrations\
**Tags:** python\
**Created:** [June 25, 2021, 9:13pm UTC](https://community.hubspot.com/t/hubspot-api-client-distribution/39625 "2021-06-25T21:13:38Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![GBeckwith](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/gbeckwith/32/102498_2.png) [@GBeckwith](https://community.hubspot.com/u/GBeckwith)\
**Post date:** [June 25, 2021, 9:13pm UTC](https://community.hubspot.com/t/hubspot-api-client-distribution/39625/1 "2021-06-25T21:13:38Z")

</div>

Hello,

I am new to hubspot and this is my first posting. I am having an issue when compiling my program using PyInstaller. I am unable to run the .exe created by PyInstaller; I get the following error:

```lia-code-sample
C:\Projects>HubSpot_GET_Companies.exe
Traceback (most recent call last):
 File "HubSpot_GET_Companies.py", line 7, in <module>
 File "hubspot\discovery\crm\companies\discovery.py", line 24, in get_all
 File "hubspot\discovery\crm\companies\discovery.py", line 9, in basic_api
 File "hubspot\discovery\discovery_base.py", line 20, in _configure_api_client
 File "pkg_resources\ __init__.py", line 899, in require
 File "pkg_resources\ __init__.py", line 785, in resolve
pkg_resources.DistributionNotFound: The 'hubspot-api-client' distribution was not found and is required by the application
[10632] Failed to execute script HubSpot_GET_Companies

```

I have attempted to use the --hidden-import parameter of PyInstaller with several different variations of what I think is the correct module name (tried “hubspot”, “HubSpot”, “hubspot-api-client”, but when PyInstaller compiles, it does not include any library data for hubspot modules. Therefore my application will not run on my local or remote machine.

`C:\python\Scripts>PyInstaller --onefile "C:\Users\xxxxx\PycharmProjects\xxxxx\HubSpot_GET_Companies.py" --hidden-import="hubspot-api-client" --paths "C:\python38\Lib\site-packages`

In the header of my script, I have imported hubspot:

```lia-code-sample
from hubspot import HubSpot
import pandas as pd
import os

```

Any idea what am I doing wrong? I feel like it is something simple, but I have been struggling with this all day, and I can’t seem to find anything online about how to solve this.

Any help would be MUCH apprecaited. TIA beckwiga

---

<div class="post-metadata">

**Author:** ![dennisedson](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/dennisedson/32/28044_2.png) [@dennisedson](https://community.hubspot.com/u/dennisedson)\
**Post date:** [June 29, 2021, 3:51pm UTC](https://community.hubspot.com/t/hubspot-api-client-distribution/39625/2 "2021-06-29T15:51:15Z")

</div>

@GBeckwith

When it comes to python, I always enlist the kind service of @taran42 . Mainly because I like the avatar 😉

@taran42 , could you lend a hand 🙏

---

<div class="post-metadata">

**Author:** ![taran42](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/taran42/32/105524_2.png) [@taran42](https://community.hubspot.com/u/taran42)\
**Post date:** [June 30, 2021, 2:25pm UTC](https://community.hubspot.com/t/hubspot-api-client-distribution/39625/3 "2021-06-30T14:25:09Z")

</div>

@dennisedson I am not familiar with PyInstaller, so I am only able to speculate as to what could be wrong here.

@GBeckwith I would say to make sure you’re including the correct HubSpot module; I think there are a few of them floating around. It may also depend on if you’re using v2 or v3.

---

<div class="post-metadata">

**Author:** ![GBeckwith](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/gbeckwith/32/102498_2.png) [@GBeckwith](https://community.hubspot.com/u/GBeckwith)\
**Post date:** [July 1, 2021, 1:35pm UTC](https://community.hubspot.com/t/hubspot-api-client-distribution/39625/4 "2021-07-01T13:35:53Z")

</div>

Hi Taran, thanks for the reply. Yeah … could be the module, I tried installing and uninstalling via pip. Same result. I was unable to figure this out, but decided just to use the compiled .pyc files (which run as expected from the \_\_pycached\_\_ folder) instead of spending any more time on trying to compile .exes.
