trying to single exe package app that uses google api client

630 views
Skip to first unread message

Rob Crouch

unread,
Apr 14, 2015, 3:14:50 AM4/14/15
to pyins...@googlegroups.com
I have a python program which I've successfully packaged up as a single exe using pyinstaller in the past. Recently I added new features which make use of the google api python client ( https://developers.google.com/api-client-library/python/ ). I've attempted to make a new single exe package of the new version and it fails to run.

I enable debugging and the console and initially the issue was that it hadn't picked up the oauth lib. I fixed that by adding the following to my spec file:

hiddenimports=['googleapiclient', 'apiclient']

When I build I can see this:

53092 INFO: Hidden import 'googleapiclient' has been found otherwise
53093 INFO: Hidden import 'apiclient' has been found otherwise

However, now when I run the rebuilt exe I get the following error before it exits:

pkg_resources.DistributionNotFound: google-api-python-client

I can't see any reference to that and I'm not sure how to force it to be packaged up with the exe.

I figure I can't be the only person to have ever wanted to package up a python program that makes use of the google api, but I failed to find any help during a lot of time with my friend google...

Any tips?

Hartmut Goebel

unread,
Apr 14, 2015, 4:11:11 AM4/14/15
to pyins...@googlegroups.com
Am 08.04.2015 um 17:05 schrieb Rob Crouch:
Any tips?

https://github.com/pyinstaller/pyinstaller/wiki/FAQ -> Misc
https://github.com/pyinstaller/pyinstaller/wiki/How-to-Report-Bugs#make-sure-everything-is-packaged-correctly

--
Schönen Gruß
Hartmut Goebel
Dipl.-Informatiker (univ), CISSP, CSSLP
Information Security Management, Security Governance, Secure Software Development

Goebel Consult, Landshut
http://www.goebel-consult.de

Blog: http://www.goebel-consult.de/blog/feiertagsarbeit-bei-teletrust
Kolumne: http://www.cissp-gefluester.de/2011-10-aus-der-schublade-in-die-koepfe

Reply all
Reply to author
Forward
0 new messages