{"action":"created","issue":{"url":"https://api.github.com/repos/pyca/cryptography/issues/2155","labels_url":"https://api.github.com/repos/pyca/cryptography/issues/2155/labels{/name}","comments_url":"https://api.github.com/repos/pyca/cryptography/issues/2155/comments","events_url":"https://api.github.com/repos/pyca/cryptography/issues/2155/events","html_url":"https://github.com/pyca/cryptography/issues/2155","id":95038238,"number":2155,"title":"py2exe FileNotFoundError: [Errno 2] No such file or directory \\dist\\\\library .zip\\\\cryptography\\\\hazmat\\\\bindings\\\\openssl\\\\src/osrandom_engine.h'","user":{"login":"catpython","id":13339461,"avatar_url":"https://avatars.githubusercontent.com/u/13339461?v=3","gravatar_id":"","url":"https://api.github.com/users/catpython","html_url":"https://github.com/catpython","followers_url":"https://api.github.com/users/catpython/followers","following_url":"https://api.github.com/users/catpython/following{/other_user}","gists_url":"https://api.github.com/users/catpython/gists{/gist_id}","starred_url":"https://api.github.com/users/catpython/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/catpython/subscriptions","organizations_url":"https://api.github.com/users/catpython/orgs","repos_url":"https://api.github.com/users/catpython/repos","events_url":"https://api.github.com/users/catpython/events{/privacy}","received_events_url":"https://api.github.com/users/catpython/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-07-14T20:55:08Z","updated_at":"2015-07-15T11:55:48Z","closed_at":null,"body":"I meet an error when I try to make an exe file, my python is 3.4, And in C:\\Users\\jpu\\AppData\\Local\\Continuum\\Anaconda3\\Lib\\site-packages\\cryptography\\hazmat\\bindings\\openssl\\src\\ there are two files: osrandom_engine.c , osrandom_engine.h\r\nAfter I created the exe, and run the myprogram.exe file,\r\nit tells me that:\r\n\r\nFileNotFoundError: [Errno 2] No such file or directory: 'c:\\\\test\\\\dist\\\\library\r\n.zip\\\\cryptography\\\\hazmat\\\\bindings\\\\openssl\\\\src/osrandom_engine.h'\r\n\r\nIn the myprogram.exe, I import the pyopenssl as: \r\nfrom OpenSSL import crypto\r\n…..\r\n…\r\n….\r\n\r\nWhat is the error caused by?\r\nhow to fix this problem? \r\n\r\nThanks,\r\n\r\ncat\r\n\r\nc:\\test>python setup.py py2exe\r\nrunning py2exe\r\n\r\n  11 missing Modules\r\n  ------------------\r\n? backports                           imported from setuptools.ssl_support\r\n? packaging                           imported from pkg_resources\r\n? pywintypes                          imported from -\r\n? setuptools_svn                      imported from setuptools.command.egg_info\r\n? testing                             imported from cffi.recompiler\r\n? urllib.pathname2url                 imported from setuptools.compat\r\n? urllib.splittag                     imported from setuptools.compat\r\n? urllib.url2pathname                 imported from setuptools.compat\r\n? win32api                            imported from platform, win32evtlogutil\r\n? win32com                            imported from setuptools.sandbox\r\n? wincertstore                        imported from setuptools.ssl_support\r\nBuilding 'dist\\teSSL.exe'.\r\nBuilding shared code archive 'dist\\library.zip'.\r\nCopy c:\\users\\jpu\\appdata\\local\\continuum\\anaconda3\\python34.dll to dist\r\nCopy C:\\Users\\jpu\\AppData\\Local\\Continuum\\Anaconda3\\lib\\site-packages\\win32\\win3\r\n2evtlog.pyd to dist\\win32evtlog.pyd\r\nCopy C:\\Users\\jpu\\AppData\\Local\\Continuum\\Anaconda3\\DLLs\\pyexpat.pyd to dist\\pye\r\nxpat.pyd\r\nCopy C:\\Users\\jpu\\AppData\\Local\\Continuum\\Anaconda3\\lib\\site-packages\\_cffi_back\r\nend.pyd to dist\\_cffi_backend.pyd\r\nCopy C:\\Users\\jpu\\AppData\\Local\\Continuum\\Anaconda3\\DLLs\\_ctypes.pyd to dist\\_ct\r\nypes.pyd\r\nCopy C:\\Users\\jpu\\AppData\\Local\\Continuum\\Anaconda3\\DLLs\\_decimal.pyd to dist\\_d\r\necimal.pyd\r\nCopy C:\\Users\\jpu\\AppData\\Local\\Continuum\\Anaconda3\\lib\\site-packages\\cryptograp\r\nhy\\_Cryptography_cffi_c6806e2axd5c405b7.pyd to dist\\cryptography._Cryptography_c\r\nffi_c6806e2axd5c405b7.pyd\r\nCopy C:\\Users\\jpu\\AppData\\Local\\Continuum\\Anaconda3\\DLLs\\_bz2.pyd to dist\\_bz2.p\r\nyd\r\nCopy C:\\Users\\jpu\\AppData\\Local\\Continuum\\Anaconda3\\DLLs\\_lzma.pyd to dist\\_lzma\r\n.pyd\r\nCopy C:\\Users\\jpu\\AppData\\Local\\Continuum\\Anaconda3\\DLLs\\_multiprocessing.pyd to\r\ndist\\_multiprocessing.pyd\r\nCopy C:\\Users\\jpu\\AppData\\Local\\Continuum\\Anaconda3\\DLLs\\select.pyd to dist\\sele\r\nct.pyd\r\nCopy C:\\Users\\jpu\\AppData\\Local\\Continuum\\Anaconda3\\DLLs\\unicodedata.pyd to dist\r\n\\unicodedata.pyd\r\nCopy C:\\Users\\jpu\\AppData\\Local\\Continuum\\Anaconda3\\lib\\site-packages\\cryptograp\r\nhy\\_Cryptography_cffi_a8febd48xffc7b1ce.pyd to dist\\cryptography._Cryptography_c\r\nffi_a8febd48xffc7b1ce.pyd\r\nCopy C:\\Users\\jpu\\AppData\\Local\\Continuum\\Anaconda3\\DLLs\\_ssl.pyd to dist\\_ssl.p\r\nyd\r\nCopy C:\\Users\\jpu\\AppData\\Local\\Continuum\\Anaconda3\\DLLs\\_socket.pyd to dist\\_so\r\ncket.pyd\r\nCopy C:\\Users\\jpu\\AppData\\Local\\Continuum\\Anaconda3\\DLLs\\_hashlib.pyd to dist\\_h\r\nashlib.pyd\r\nCopy C:\\Users\\jpu\\AppData\\Local\\Continuum\\Anaconda3\\lib\\site-packages\\cryptograp\r\nhy\\_Cryptography_cffi_b03f9c7x62b488b1.pyd to dist\\cryptography._Cryptography_cf\r\nfi_b03f9c7x62b488b1.pyd\r\nCopy DLL C:\\Users\\jpu\\AppData\\Local\\Continuum\\Anaconda3\\MSVCR100.dll to dist\\\r\nCopy ExtensionDLL C:\\Users\\jpu\\AppData\\Local\\Continuum\\Anaconda3\\lib\\site-packag\r\nes\\win32\\pywintypes34.dll to dist\\\r\n\r\nc:\\test>cd dist\r\n---------------------------------------------------------------------------------------------------------------------------\r\n\r\nc:\\test\\dist>teSSL.exe\r\nTraceback (most recent call last):\r\n  File \"teSSL.py\", line 1, in <module>\r\n  File \"<frozen importlib._bootstrap>\", line 2237, in _find_and_load\r\n  File \"<frozen importlib._bootstrap>\", line 2226, in _find_and_load_unlocked\r\n  File \"<frozen importlib._bootstrap>\", line 1191, in _load_unlocked\r\n  File \"<frozen importlib._bootstrap>\", line 1161, in _load_backward_compatible\r\n  File \"C:\\Users\\jpu\\AppData\\Local\\Continuum\\Anaconda3\\lib\\site-packages\\OpenSSL\r\n\\__init__.py\", line 8, in <module>\r\n    from OpenSSL import rand, crypto, SSL\r\n  File \"<frozen importlib._bootstrap>\", line 2237, in _find_and_load\r\n  File \"<frozen importlib._bootstrap>\", line 2226, in _find_and_load_unlocked\r\n  File \"<frozen importlib._bootstrap>\", line 1191, in _load_unlocked\r\n  File \"<frozen importlib._bootstrap>\", line 1161, in _load_backward_compatible\r\n  File \"C:\\Users\\jpu\\AppData\\Local\\Continuum\\Anaconda3\\lib\\site-packages\\OpenSSL\r\n\\rand.py\", line 11, in <module>\r\n    from OpenSSL._util import (\r\n  File \"<frozen importlib._bootstrap>\", line 2237, in _find_and_load\r\n  File \"<frozen importlib._bootstrap>\", line 2226, in _find_and_load_unlocked\r\n  File \"<frozen importlib._bootstrap>\", line 1191, in _load_unlocked\r\n  File \"<frozen importlib._bootstrap>\", line 1161, in _load_backward_compatible\r\n  File \"C:\\Users\\jpu\\AppData\\Local\\Continuum\\Anaconda3\\lib\\site-packages\\OpenSSL\r\n\\_util.py\", line 6, in <module>\r\n    from cryptography.hazmat.bindings.openssl.binding import Binding\r\n  File \"<frozen importlib._bootstrap>\", line 2237, in _find_and_load\r\n  File \"<frozen importlib._bootstrap>\", line 2226, in _find_and_load_unlocked\r\n  File \"<frozen importlib._bootstrap>\", line 1191, in _load_unlocked\r\n  File \"<frozen importlib._bootstrap>\", line 1161, in _load_backward_compatible\r\n  File \"C:\\Users\\jpu\\AppData\\Local\\Continuum\\Anaconda3\\lib\\site-packages\\cryptog\r\nraphy\\hazmat\\bindings\\openssl\\binding.py\", line 60, in <module>\r\n    class Binding(object):\r\n  File \"C:\\Users\\jpu\\AppData\\Local\\Continuum\\Anaconda3\\lib\\site-packages\\cryptog\r\nraphy\\hazmat\\bindings\\openssl\\binding.py\", line 109, in Binding\r\n    libraries=_get_libraries(sys.platform)\r\n File \"C:\\Users\\jpu\\AppData\\Local\\Continuum\\Anaconda3\\lib\\site-packages\\cryptog\r\nraphy\\hazmat\\bindings\\utils.py\", line 68, in build_ffi_for_binding\r\n    __import__(module_name)\r\n  File \"<frozen importlib._bootstrap>\", line 2237, in _find_and_load\r\n  File \"<frozen importlib._bootstrap>\", line 2226, in _find_and_load_unlocked\r\n  File \"<frozen importlib._bootstrap>\", line 1191, in _load_unlocked\r\n  File \"<frozen importlib._bootstrap>\", line 1161, in _load_backward_compatible\r\n  File \"C:\\Users\\jpu\\AppData\\Local\\Continuum\\Anaconda3\\lib\\site-packages\\cryptog\r\nraphy\\hazmat\\bindings\\openssl\\osrandom_engine.py\", line 10, in <module>\r\n    os.path.dirname(__file__), \"src/osrandom_engine.h\"\r\nFileNotFoundError: [Errno 2] No such file or directory: 'c:\\\\test\\\\dist\\\\library\r\n.zip\\\\cryptography\\\\hazmat\\\\bindings\\\\openssl\\\\src/osrandom_engine.h'\r\n"},"comment":{"url":"https://api.github.com/repos/pyca/cryptography/issues/comments/121592022","html_url":"https://github.com/pyca/cryptography/issues/2155#issuecomment-121592022","issue_url":"https://api.github.com/repos/pyca/cryptography/issues/2155","id":121592022,"user":{"login":"Ayrx","id":1937160,"avatar_url":"https://avatars.githubusercontent.com/u/1937160?v=3","gravatar_id":"","url":"https://api.github.com/users/Ayrx","html_url":"https://github.com/Ayrx","followers_url":"https://api.github.com/users/Ayrx/followers","following_url":"https://api.github.com/users/Ayrx/following{/other_user}","gists_url":"https://api.github.com/users/Ayrx/gists{/gist_id}","starred_url":"https://api.github.com/users/Ayrx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Ayrx/subscriptions","organizations_url":"https://api.github.com/users/Ayrx/orgs","repos_url":"https://api.github.com/users/Ayrx/repos","events_url":"https://api.github.com/users/Ayrx/events{/privacy}","received_events_url":"https://api.github.com/users/Ayrx/received_events","type":"User","site_admin":false},"created_at":"2015-07-15T11:55:48Z","updated_at":"2015-07-15T11:55:48Z","body":"Ref #2039.\r\n\r\n@reaperhulk "}}