I have write a python script for accessing Google's spreadsheets by it's API.
Thus, I use the 3-party module "oauth2client" to achieve this goal, and importing it in my python script like this:
from oauth2client.client import SignedJwtAssertionCredentials
The first time I compiled it with Python2.7, it gave me an error: " No crypto library available. "
After researching, I found that the 3-party package " PyOpenSSL " is necessary. (reference)
So I use " pip " command to install it, and it's successfully compiled and works on my computer(win7).
However, when I try to package my python script to the executable file(.exe) with 'py2exe', a problem happened while including "PyOpenSSL".
My "setup.py" is like this with the following options:
setup(
windows=['dream_club(SourceCode).py'],
options={
"py2exe":{
"includes": ["oauth2client.client", "pyopenssl"],
}
}
)
And it gives the error: "no module named pyopenssl"
I originally guess that using 'pip' to install it may be the reason, so I download it again through the github, and move the whole folder to "C:\Python27\Lib\site-packages", but it still doesn't work!
I try to change the option from 'includes' to 'packages', but it's in vain.
I do the same procedure when trying to include "oauth2client.client", and it successes, so I am confused now.
My device's OS is Windows7, and how can I include this package(PyOpenSSL) through py2exe?