Ошибка установки M2Crypto с pip на MacOS Catalina 10.15.1 внутри virtualenv - PullRequest
0 голосов
/ 11 ноября 2019

Я пытаюсь установить M2Crypto с пипом 19.3.1, работающим внутри virtualenv с Python 3.7.4 на macOS Catalina 10.15.1. Я думаю, M2Crypto работает на Python2? тогда помогите мне запустить M2Crypto с Python3. Я попытался pip install M2Crypto, а затем также python3 -m pip install M2Crypto. На моем устройстве установлен opensll и swig, которые я установил с brew.

ERROR: Command errored out with exit status 1:
   command: /Users/faisal/Desktop/upcjmi/server/venv/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/37/stg7fq2n5kz5vsr5m1_yrzmh0000gn/T/pip-install-9v3do0qp/m2crypto/setup.py'"'"'; __file__='"'"'/private/var/folders/37/stg7fq2n5kz5vsr5m1_yrzmh0000gn/T/pip-install-9v3do0qp/m2crypto/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /private/var/folders/37/stg7fq2n5kz5vsr5m1_yrzmh0000gn/T/pip-wheel-d995gqq6 --python-tag cp37
       cwd: /private/var/folders/37/stg7fq2n5kz5vsr5m1_yrzmh0000gn/T/pip-install-9v3do0qp/m2crypto/
  Complete output (53 lines):
  running bdist_wheel
  running build
  running build_py
  running build_ext
  building 'M2Crypto._m2crypto' extension
  swigging SWIG/_m2crypto.i to SWIG/_m2crypto_wrap.c
  swig -python -py3 -I/usr/local/Cellar/python/3.7.4_1/Frameworks/Python.framework/Versions/3.7/include/python3.7m -I/usr/include/openssl -I/usr/local/include -I/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/11.0.0/include -I/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks (framework directory) -I/usr/local/include -I/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/11.0.0/include -I/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks (framework directory) -includeall -modern -builtin -outdir /private/var/folders/37/stg7fq2n5kz5vsr5m1_yrzmh0000gn/T/pip-install-9v3do0qp/m2crypto/M2Crypto -o SWIG/_m2crypto_wrap.c SWIG/_m2crypto.i
  Deprecated command line option: -modern. This option is now always on.
  SWIG/_m2crypto.i:62: Error: Unable to find 'openssl/opensslv.h'
  SWIG/_m2crypto.i:68: Error: Unable to find 'openssl/safestack.h'
  SWIG/_evp.i:12: Error: Unable to find 'openssl/opensslconf.h'
  SWIG/_rc4.i:5: Error: Unable to find 'openssl/opensslconf.h'
  SWIG/_ec.i:7: Error: Unable to find 'openssl/opensslconf.h'
  error: command 'swig' failed with exit status 1
  ----------------------------------------
  ERROR: Failed building wheel for m2crypto
  Running setup.py clean for m2crypto
Failed to build m2crypto
Installing collected packages: m2crypto
    Running setup.py install for m2crypto ... error
    ERROR: Command errored out with exit status 1:
     command: /Users/faisal/Desktop/upcjmi/server/venv/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/37/stg7fq2n5kz5vsr5m1_yrzmh0000gn/T/pip-install-9v3do0qp/m2crypto/setup.py'"'"'; __file__='"'"'/private/var/folders/37/stg7fq2n5kz5vsr5m1_yrzmh0000gn/T/pip-install-9v3do0qp/m2crypto/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /private/var/folders/37/stg7fq2n5kz5vsr5m1_yrzmh0000gn/T/pip-record-vyflein4/install-record.txt --single-version-externally-managed --compile --install-headers /Users/faisal/Desktop/upcjmi/server/venv/bin/../include/site/python3.7/m2crypto
         cwd: /private/var/folders/37/stg7fq2n5kz5vsr5m1_yrzmh0000gn/T/pip-install-9v3do0qp/m2crypto/
    Complete output (56 lines):
    running install
    running build
    running build_py
    creating build
    creating build/lib.macosx-10.14-x86_64-3.7
    creating build/lib.macosx-10.14-x86_64-3.7/M2Crypto
    running build_ext
    building 'M2Crypto._m2crypto' extension
    swigging SWIG/_m2crypto.i to SWIG/_m2crypto_wrap.c
    swig -python -py3 -I/usr/local/Cellar/python/3.7.4_1/Frameworks/Python.framework/Versions/3.7/include/python3.7m -I/usr/include/openssl -I/usr/local/include -I/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/11.0.0/include -I/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks (framework directory) -I/usr/local/include -I/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/11.0.0/include -I/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks (framework directory) -includeall -modern -builtin -outdir /private/var/folders/37/stg7fq2n5kz5vsr5m1_yrzmh0000gn/T/pip-install-9v3do0qp/m2crypto/M2Crypto -o SWIG/_m2crypto_wrap.c SWIG/_m2crypto.i
    Deprecated command line option: -modern. This option is now always on.
    SWIG/_m2crypto.i:62: Error: Unable to find 'openssl/opensslv.h'
    SWIG/_m2crypto.i:68: Error: Unable to find 'openssl/safestack.h'
    SWIG/_evp.i:12: Error: Unable to find 'openssl/opensslconf.h'
    SWIG/_rc4.i:5: Error: Unable to find 'openssl/opensslconf.h'
    SWIG/_ec.i:7: Error: Unable to find 'openssl/opensslconf.h'
    error: command 'swig' failed with exit status 1
    ----------------------------------------
ERROR: Command errored out with exit status 1: /Users/faisal/Desktop/upcjmi/server/venv/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/37/stg7fq2n5kz5vsr5m1_yrzmh0000gn/T/pip-install-9v3do0qp/m2crypto/setup.py'"'"'; __file__='"'"'/private/var/folders/37/stg7fq2n5kz5vsr5m1_yrzmh0000gn/T/pip-install-9v3do0qp/m2crypto/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /private/var/folders/37/stg7fq2n5kz5vsr5m1_yrzmh0000gn/T/pip-record-vyflein4/install-record.txt --single-version-externally-managed --compile --install-headers /Users/faisal/Desktop/upcjmi/server/venv/bin/../include/site/python3.7/m2crypto Check the logs for full command output.
...