Потратил почти час на поиски решения по успешной установке cryptography
на MacOS High Sierra v10.13.3
С помощью этой команды в виртуальной среде.
$ pip install cryptography==0.9
Я получаю этот длинный набор ошибок:
src/cryptography/hazmat/bindings/__pycache__/_Cryptography_cffi_e7d09016xc302a38b.c:505:6: error: conflicting types for 'BIO_new_mem_buf'
BIO *BIO_new_mem_buf(void *, int);
^
/usr/local/opt/openssl/include/openssl/bio.h:692:6: note: previous declaration is here
BIO *BIO_new_mem_buf(const void *buf, int len);
^
src/cryptography/hazmat/bindings/__pycache__/_Cryptography_cffi_e7d09016xc302a38b.c:2019:15: error: redefinition of 'SSLv2_method' as different kind of symbol
SSL_METHOD* (*SSLv2_method)(void) = NULL;
^
/usr/local/opt/openssl/include/openssl/ssl.h:2349:19: note: previous definition is here
const SSL_METHOD *SSLv2_method(void); /* SSLv2 */
^
src/cryptography/hazmat/bindings/__pycache__/_Cryptography_cffi_e7d09016xc302a38b.c:2020:15: error: redefinition of 'SSLv2_client_method' as different kind of symbol
SSL_METHOD* (*SSLv2_client_method)(void) = NULL;
^
/usr/local/opt/openssl/include/openssl/ssl.h:2351:19: note: previous definition is here
const SSL_METHOD *SSLv2_client_method(void); /* SSLv2 */
^
src/cryptography/hazmat/bindings/__pycache__/_Cryptography_cffi_e7d09016xc302a38b.c:2021:15: error: redefinition of 'SSLv2_server_method' as different kind of symbol
SSL_METHOD* (*SSLv2_server_method)(void) = NULL;
^
/usr/local/opt/openssl/include/openssl/ssl.h:2350:19: note: previous definition is here
const SSL_METHOD *SSLv2_server_method(void); /* SSLv2 */
^
src/cryptography/hazmat/bindings/__pycache__/_Cryptography_cffi_e7d09016xc302a38b.c:17971:29: warning: implicit conversion loses integer precision: 'long' to 'int' [-Wshorten-64-to-32]
{ result = BIO_set_fd(x0, x1, x2); }
~~~~~~~~~~~~~~~^~~~~~~
/usr/local/opt/openssl/include/openssl/bio.h:520:64: note: expanded from macro 'BIO_set_fd'
# define BIO_set_fd(b,fd,c) BIO_int_ctrl(b,BIO_C_SET_FD,c,fd)
~~~~~~~~~~~~ ^~
src/cryptography/hazmat/bindings/__pycache__/_Cryptography_cffi_e7d09016xc302a38b.c:45897:14: warning: implicit conversion loses integer precision: 'long' to 'int' [-Wshorten-64-to-32]
{ result = X509_CRL_get_version(x0); }
~ ^~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/opt/openssl/include/openssl/x509.h:602:42: note: expanded from macro 'X509_CRL_get_version'
# define X509_CRL_get_version(x) ASN1_INTEGER_get((x)->crl->version)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2 warnings and 4 errors generated.
error: command 'cc' failed with exit status 1
И я также попробовал следующую инструкцию на этом GitHub source , используя brew, дав команду brew install openssl
, затем внесите изменения~/.bash_profile
.
К сожалению, ошибка не устранена, и я все еще получаю это
2 warnings and 4 errors generated.
error: command 'cc' failed with exit status 1
В конце терминальной консоли.