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

后端 未结 6 896
长情又很酷
长情又很酷 2020-12-02 01:13

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 appl

6条回答
  •  清歌不尽
    2020-12-02 01:55

    My case is an Python-Flask windows app bundled with Pyinstaller --onefile option, using a .spec file.

    I've copied the folder google_api_python_client-1.9.3.dist-info from the original location (maybe the windows site-packages folder) to the project folder.

    Adding the following line to Pyinstaller spec file datas section (app.spec) was the solution for the problem.

    a = Analysis(.......  
    
    datas=[.....
    
    ('project\\google_api_python_client-1.9.3.dist-info','google_api_python_client-1.9.3.dist-info'),     
    
    .......],
    

提交回复
热议问题