- edited description
OpenSSL installed by Python is not found by Microsoft Visual C++ Compiler for Python 2.7
As per your usage instructions I have not added Python to the PATH env var. I have 4 Python installations 32 and 64 bit 2.7.9 and 32 and 64 bit 3.4.2
Python installs OpenSSL by default for all.
How can I make the Microsoft Visual C++ Compiler for Python 2.7 (VCForPython27.msi) find the OpenSSL installed by the Python installer?
What I did. Please forgive the length of the text. :
I have the following installed:
python-2.7.9.amd64.msi into C:\Python27-x64
python-2.7.9.msi into C:\Python27
python-3.4.2.amd64.msi into C:\Python34-x64
python-3.4.2.msi into C:\Python34
pywin32-219.win32-py2.7.exe into C:\Python27
pywin32-219.win32-py3.4.exe into C:\Python34
pywin32-219.win-amd64-py2.7.exe into C:\Python27-x64
pywin32-219.win-amd64-py3.4.exe into C:\Python34-x64
Microsoft Visual C++ Compiler for Python 2.7 :
VCForPython27.msi required to compile Python plugins Cheetah and PyOpemSSL
launchwin.amd64.msi into C:\Windows
As per your usage instructions I chose not to add Python to PATH: "In practice, once the launcher is installed, you can run any Python script on your system even if Python is not on the path, simply invoking the script by name (if you have .py and .pyw in your PATHEXT environment variable, you don't even need to specify the extension):" I added .PYW to PATHEXT (.PY was already added.)
I checked that the Python installers had installed OpenSSL:
C:\home\robert\webdev\git-repos\dev-protocols-python-pyopenssl> py -2
Python 2.7.9 (default, Dec 10 2014, 12:28:03) [MSC v.1500 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import ssl
>>> ssl.OPENSSL_VERSION
'OpenSSL 1.0.1j 15 Oct 2014'
>>> exit()
C:\home\robert\webdev\git-repos\dev-protocols-python-pyopenssl> py -3
Python 3.4.2 (v3.4.2:ab2c023a9432, Oct 6 2014, 22:16:31) [MSC v.1600 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import ssl
>>> ssl.OPENSSL_VERSION
'OpenSSL 1.0.1i 6 Aug 2014'
>>> exit()
Then I installed/compiled Cheetah. All OK.
Then I installed/compiled PyOpenSSL. And OpenSSL (header) file openssl/aes.h can't be found :
Installed c:\users\robert\appdata\local\temp\easy_install-ikkhhw\cryptography-0.7.1\.eggs\pycparser-2.10-py2.7.egg
no previously-included directories found matching 'docs\_build'
warning: no previously-included files matching '*' found under directory 'vectors'
_Cryptography_cffi_70441dc9x8be47966.c
src\cryptography\hazmat\bindings\__pycache__\_Cryptography_cffi_70441dc9x8be47966.c(194) : fatal error C1083: Cannot open include file: 'openssl/aes.h': No such file or directory
error: [Error 5] Access is denied: 'c:\\users\\robert\\appdata\\local\\temp\\easy_install-ikkhhw\\cryptography-0.7.1\\.eggs\\cffi-0.8.6-py2.7-win-amd64.egg\\_cffi_backend.pyd'
C:\home\robert\webdev\git-repos\dev-protocols-python-pyopenssl>
After this error I have also looked into installing Win32OpenSSL and Win64OpenSSL from here: http://slproweb.com/products/Win32OpenSSL.html But I decided against it because I could not determine if installing both 32-bit and 64-bit versions was possible or even required in my case with 4 installations. Even so, there was no guarantee that OpenSSL would be found by the compiler.
Comments (7)
-
reporter -
reporter - edited description
-
reporter - edited description
-
reporter - edited description
-
repo owner - changed status to invalid
This does not appear to be a bug in the Python launcher for Windows, which appears to be working as expected (
py -2
,py -3
). Please read PEP 397 and try to understand the scope of what the launcher does. -
reporter Then apparently I do need to add Python to the PATH env var. Or maybe OpenSSL to LIB and INCLUDE. (Which is going to be tricky with 4 installations.) Nevermind. Thanks anyway.
-
reporter BTW, it's not py.exe or pyw.exe which finds OpenSSL. They both find Python. The Python shell finds OpenSSL.
- Log in to comment