【发布时间】:2017-07-17 17:05:33
【问题描述】:
我有一个 python 脚本,开头如下:
from google.cloud import bigquery
此软件包安装有:
pip install google-cloud-bigquery --upgrade
我的印象是 pyinstaller 应该找到所有必需的包并安装它们,但是当我在 windows 上运行创建的 .exe 或在 mac 上运行时,我收到错误消息:
pkg_resources.DistributionNotFound: The 'google-cloud-core' distribution was not found and is required by the application
这是我的 .spec 文件,请告诉我可以将 google-cloud-core 放在哪里,以便安装正确的软件包。
# -*- mode: python -*-
block_cipher = None
a = Analysis(['tests.py'],
pathex=['/Users/daniellee/Development/alice-connectors/aconn'],
binaries=[],
datas=[],
hiddenimports=[],
hookspath=[],
runtime_hooks=[],
excludes=[],
win_no_prefer_redirects=False,
win_private_assemblies=False,
cipher=block_cipher)
pyz = PYZ(a.pure, a.zipped_data,
cipher=block_cipher)
exe = EXE(pyz,
a.scripts,
a.binaries,
a.zipfiles,
a.datas,
name='tests',
debug=False,
strip=False,
upx=True,
console=True )
提前致谢。
【问题讨论】:
标签: python python-3.x exe pyinstaller