Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
522 views
in Technique[技术] by (71.8m points)

The 'google-api-python-client' distribution was not found and is required by the application with pyinstaller

I am currently trying to build an app with pyinstaller. I have gotten the error The 'google-api-python-client' distribution was not found and is required by the application and I'm completely lost why.

Running pip show google-api-python-client results with

Name: google-api-python-client
Version: 1.8.2
Summary: Google API Client Library for Python
Home-page: http://github.com/google/google-api-python-client/
Author: Google LLC
Author-email: [email protected]
License: Apache 2.0
Location: c:devsoftwareschoology_scrapeschoology_scrape_venvlibsite-packages
Requires: google-auth-httplib2, uritemplate, google-auth, google-api-core, httplib2, six
Required-by:

I also have a requirements.txt file with all the libraries used in the project

Any help would be greatly appreciated!

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

I was able to find the solution here Link

Update your version of google-api-python-client to the version specified in the link (worked for me)

Also made a little .bat file:

pyinstaller --hidden-import="pkg_resources.py2_warn" --hidden-import="googleapiclient" --hidden-import="apiclient"  main.py --onefile

Also of note: I ran the bat file in a virtual environment.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...