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:
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:
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