我创建了一个python程序,使用以下外部库将数据发送到谷歌电子表格:
该程序按预期工作,但是当我尝试将其转换为可执行文件时,每次我生成.exe文件时都会出现以下错误:
Traceback (most recent call last):
File "C:\Python27\lib\site-packages\cx_Freeze\initscripts\Console.py", line 27, in <module>
exec(code, m.__dict__)
File "Demo.py", line 13, in <module>
File "C:\Python27\lib\site-packages\oauth2client\util.py", line 140, in positional_wrapper
return wrapped(*args, **kwargs)
File "C:\Python27\lib\site-packages\oauth2client\client.py", line 1630, in __init__
_RequireCryptoOrDie()
File "C:\Python27\lib\site-packages\oauth2client\client.py", line 1581, in _RequireCryptoOrDie
raise CryptoUnavailableError('No crypto library available')
oauth2client.client.CryptoUnavailableError: No crypto library available
你们中的任何人都知道问题可能是什么,我可以采取哪些措施来解决它?
提前致谢
编辑:我试图同时使用cx_freeze和py2exe。
中我有类似的错误下面是我在cx_freeze中使用的setup.py:
from cx_Freeze import setup, Executable
setup(name = "Demo" ,
version = "1.0" ,
description = "A python Demo" ,
executables = [Executable("Demo.py")])