Giter Club home page Giter Club logo

Comments (22)

alex avatar alex commented on July 20, 2024

Can you try the suggestions on https://stackoverflow.com/questions/2817869/error-unable-to-find-vcvarsall-bat ?

from pyopenssl.

thezoggy avatar thezoggy commented on July 20, 2024

I dont have visual studio installed... do i really need it? (as thats a bit of a hefty d/l) and if so.. which version

from pyopenssl.

thezoggy avatar thezoggy commented on July 20, 2024

installed VS2010 Express but it still did not work. after searching more I see that it mentions that you need to do Vs2008 since thats why python 2.6.x, 2.7.x is built off of..
http://blog.victorjabur.com/2011/06/05/compiling-python-2-7-modules-on-windows-32-and-64-using-msvc-2008-express/

so went searching for VS2008 but it's no longer listed on microsoft's site.. after more searching I found:
http://stackoverflow.com/questions/15318560/visual-c-2008-express-download-link-dead

so now im off to download 1gb of downloads to finally try and get pyopenssl to install...

from pyopenssl.

thezoggy avatar thezoggy commented on July 20, 2024

ok vs2008 w/sp1 installed. running python setup.py install now gets a bit further..

here's the bottom snippet where it stops on:

Installed c:\python27\lib\site-packages\pyopenssl-0.14a4-py2.7.egg
Processing dependencies for pyOpenSSL==0.14a4
Searching for cryptography>=0.1
Reading https://pypi.python.org/simple/cryptography/
Best match: cryptography 0.1
Downloading https://pypi.python.org/packages/source/c/cryptography/cryptography-0.1.tar.gz#md5=bdc1c5fe069deca7467b71a0cc538f17
Processing cryptography-0.1.tar.gz
Writing c:\docume~1\username\locals~1\temp\easy_install-oqddjz\cryptography-0.1\setup.cfg
Running cryptography-0.1\setup.py -q bdist_egg --dist-dir c:\docume~1\username\locals~1\temp\easy_install-oqddjz\cryptography-0.1\egg-dist-tmp-xgfwoh
Searching for cffi>=0.6
Reading https://pypi.python.org/simple/cffi/
Best match: cffi 0.8.1
Downloading https://pypi.python.org/packages/source/c/cffi/cffi-0.8.1.tar.gz#md5=1a877bf113bfe90fdefedbf9e39310d2
Processing cffi-0.8.1.tar.gz
Writing c:\docume~1\username\locals~1\temp\easy_install-oqddjz\cryptography-0.1\temp\easy_install-du49y_\cffi-0.8.1\setup.cfg
Running cffi-0.8.1\setup.py -q bdist_egg --dist-dir c:\docume~1\username\locals~1\temp\easy_install-oqddjz\cryptography-0.1\temp\easy_install-du49y_\cffi-0.8.1\egg-dist-tmp-vinggg_cffi_backend.c
c/_cffi_backend.c(5261) : warning C4146: unary minus operator applied to unsigned type, result still unsigned
c/_cffi_backend.c(5262) : warning C4146: unary minus operator applied to unsigned type, result still unsigned
c/_cffi_backend.c(5263) : warning C4146: unary minus operator applied to unsigned type, result still unsigned
c/_cffi_backend.c(5264) : warning C4146: unary minus operator applied to unsigned type, result still unsigned
ffi.c
c/libffi_msvc\ffi.c(122) : warning C4018: '>' : signed/unsigned mismatch
prep_cif.c
types.c
win32.c
   Creating library build\temp.win32-2.7\Release\c\_cffi_backend.lib and object build\temp.win32-2.7\Release\c\_cffi_backend.exp

Installed c:\docume~1\username\locals~1\temp\easy_install-oqddjz\cryptography-0.1\cffi-0.8.1-py2.7-win32.egg
Searching for pycparser
Reading https://pypi.python.org/simple/pycparser/
Best match: pycparser 2.10
Downloading https://pypi.python.org/packages/source/p/pycparser/pycparser-2.10.tar.gz#md5=d87aed98c8a9f386aa56d365fe4d515f
Processing pycparser-2.10.tar.gz
Writing c:\docume~1\username\locals~1\temp\easy_install-oqddjz\cryptography-0.1\temp\easy_install-jijlsc\pycparser-2.10\setup.cfg
Running pycparser-2.10\setup.py -q bdist_egg --dist-dir c:\docume~1\username\locals~1\temp\easy_install-oqddjz\cryptography-0.1\temp\easy_install-jijlsc\pycparser-2.10\egg-dist-tmp-ano2fp
zip_safe flag not set; analyzing archive contents...

Installed c:\docume~1\username\locals~1\temp\easy_install-oqddjz\cryptography-0.1\pycparser-2.10-py2.7.egg
_cffi__xcfd0a060xfba2f231.c
   Creating library c:\docume~1\username\locals~1\temp\easy_install-oqddjz\cryptography-0.1\cryptography\hazmat\primitives\__pycache__\
Release\cryptography\hazmat\primitives\__pycache__\_cffi__xcfd0a060xfba2f231.lib and object c:\docume~1\username\locals~1\temp\easy_install-oqddjz\cryptography-0.1\cryptography\hazmat\primitives\__pycache__\Release\cryptography\hazmat\primitives\__pycache__\_cffi__xcfd0a060xfba2f231.exp
_cffi__x5fea2bacx4a8b9ec1.c
cryptography\hazmat\primitives\__pycache__\_cffi__x5fea2bacx4a8b9ec1.c(218) : warning C4244: '=' : conversion from 'unsigned __int64' t
o 'uint8_t', possible loss of data
   Creating library c:\docume~1\username\locals~1\temp\easy_install-oqddjz\cryptography-0.1\cryptography\hazmat\primitives\__pycache__\
Release\cryptography\hazmat\primitives\__pycache__\_cffi__x5fea2bacx4a8b9ec1.lib and object c:\docume~1\username\locals~1\temp\easy_ins
tall-oqddjz\cryptography-0.1\cryptography\hazmat\primitives\__pycache__\Release\cryptography\hazmat\primitives\__pycache__\_cffi__x5fea
2bacx4a8b9ec1.exp
_cffi__xd9dc3d0ax8cb54b0a.c
cryptography\hazmat\bindings\__pycache__\_cffi__xd9dc3d0ax8cb54b0a.c(165) : fatal error C1083: Cannot open include file: 'openssl/asn1.h': No such file or directory
error: c:\docume~1\username\locals~1\temp\easy_install-oqddjz\cryptography-0.1\cffi-0.8.1-py2.7-win32.egg\_cffi_backend.pyd: Access is denied

from pyopenssl.

thezoggy avatar thezoggy commented on July 20, 2024

so looks like cryptography is just the problem. i tired installing it with pip as well.. stil hitting the same problem. gave up on this for now and nuked my vm. :(

from pyopenssl.

kouk avatar kouk commented on July 20, 2024

cryptography depends on OpenSSL. Do you have OpenSSL installed? There are binary installers somewhere on the web. It should work automatically but if it doesn't perhaps these instructions will help.

from pyopenssl.

thezoggy avatar thezoggy commented on July 20, 2024

does pyopenssl not include openssl? and if its a dependency shouldn't it be installed automatically?

installed: http://slproweb.com/download/Win32OpenSSL-1_0_1f.exe
still having the same problem... ll try out those instructions when i get home to see if that makes the difference...

from pyopenssl.

kouk avatar kouk commented on July 20, 2024

No, pyOpenSSL doesn't include OpenSSL, and OpenSSL isn't a python package so it cannot be installed automatically by pip or setuptools.

from pyopenssl.

thezoggy avatar thezoggy commented on July 20, 2024

doens't the pyopenssl binaries include openssl?

from pyopenssl.

thezoggy avatar thezoggy commented on July 20, 2024

it would appear that python 2.7.6 comes with openssl?
C:\Documents and Settings\username>openssl version OpenSSL 0.9.8e 23 Feb 2007

C:\Documents and Settings\username>python
Python 2.7.6 (default, Nov 10 2013, 19:24:18) [MSC v.1500 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
> import ssl
> ssl.OPENSSL_VERSION
'OpenSSL 0.9.8y 5 Feb 2013'

installed Win32OpenSSL-1_0_1f.exe, restarted machine.
same output as above. so not sure why openssl reports one version while python says another.. and neither match what the openssl binary was suppose to install....

reverted to previous vm snapshot before the win32openssl install.. installed pyOpenSSL-0.13.1,
https://pypi.python.org/packages/2.7/p/pyOpenSSL/pyOpenSSL-0.13.1.win32-py2.7.exe

still get the same output... but now when using py2exe I do see SSL being included in the app's lib folder..

from pyopenssl.

kouk avatar kouk commented on July 20, 2024

First, open a command prompt and type echo %PATH%. See if you can figure out where OpenSSL is installed from the output. Then see if that directory contains the Lib and Include folders. You need to make both those folders available to your compiler in order to compile cryptography (and i.e. latest pyopenssl) from source (see the link I posted earlier for one way to do that).

from pyopenssl.

kouk avatar kouk commented on July 20, 2024

All this of course pertains to the latest pyOpenSSL code, and the upcoming release (0.14, not yet released so no binaries). Earlier version binaries are available, like for version 0.13, but this won't help if you are looking to use the latest code.

from pyopenssl.

thezoggy avatar thezoggy commented on July 20, 2024

well ideally I just want a newer version of openssl included with our app. which looks to be provided by the pyopenssl binaries.. since we haven't had to build openssl before (or recall having to install openssl specifically). it looks like thats all we did in the past was install the binary pyopenssl install and when using py2exe to compile our app its included.

from pyopenssl.

thezoggy avatar thezoggy commented on July 20, 2024

looks like openssl is being included with the python binary install...
http://stackoverflow.com/questions/18752409/updating-openssl-in-python-2-7

C:\Documents and Settings\username>python -c "import _ssl; print _ssl.__file__"
C:\Python27\DLLs\_ssl.pyd
C:\Documents and Settings\username>python -c "import OpenSSL; print OpenSSL.__file__"
C:\Python27\lib\site-packages\OpenSSL\__init__.pyc

C:\Documents and Settings\username>python -c "import OpenSSL; print OpenSSL.__version__"
0.13.1

from pyopenssl.

kouk avatar kouk commented on July 20, 2024

if you want to use the SSL module included with python (import ssl), then yes you should do that. If you want to use a newer version of pyOpenSSL, e.g. import OpenSSL, currently 0.14a4 uses cryptography and therefore cffi to get to OpenSSL so you have to follow the instructions in the link I posted above.

from pyopenssl.

exarkun avatar exarkun commented on July 20, 2024

The cryptography project is now distributing binary wheels for Windows. It should no longer be necessary to build cryptography yourself on Windows. Please give those a try and report back if there are still problems (feel free to re-open the issue). Thank you!

from pyopenssl.

thezoggy avatar thezoggy commented on July 20, 2024

where are the binaries for crypto? their official site only has the source...

from pyopenssl.

exarkun avatar exarkun commented on July 20, 2024

See https://pypi.python.org/pypi/cryptography/0.2.1

from pyopenssl.

thezoggy avatar thezoggy commented on July 20, 2024

got it to finally install..

C:\sickbeard>python -c "import OpenSSL; print OpenSSL.__file__"
C:\Python27\lib\site-packages\pyopenssl-0.14-py2.7.egg\OpenSSL\__init__.pyc

C:\sickbeard>python -c "import OpenSSL; print OpenSSL.__version__"
0.14

however when i use py2exe SSL is not being included...
if I used the older pyopenssl binary installer then ssl is built out when building my app..

from pyopenssl.

exarkun avatar exarkun commented on July 20, 2024

Sorry, I don't know how py2exe works. Regardless, it seems like a topic unrelated to this issue.

I suggest you raise this in a different forum - perhaps the pyOpenSSL mailing list, perhaps the cryptography mailing list (cryptography and pyOpenSSL are separate projects), perhaps in one of the project IRC channels.

For what it's worth, I'm sorry about this regression but the feature you described only ever worked by accident. I never tried to make py2exe work with pyOpenSSL, I never tested that it worked, and so far as I can recall no one ever asked for it to work. In general, pyOpenSSL will most likely only continue to work in ways that are exercised by its test suite on its continuous integration system. If there are pyOpenSSL features that are important to you I recommend contributing tests for them.

from pyopenssl.

greatwolf avatar greatwolf commented on July 20, 2024

I'm running into the same vcvarsall.bat install snag. Why does the setup.py install automatically assume we're using a MSVC compiler to build the ssl binary module?? I have mingw32 4.6.3 and I want it to use that. Instead of assuming one compiler environment setup, it should ask the user which compiler should be used.

from pyopenssl.

hynek avatar hynek commented on July 20, 2024

@greatwolf pyOpenSSL is a pure-Python package since 0.14; please report your compiler problems to the relevant upstream projects so they can be fixed. They’re lost here.

from pyopenssl.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.